!pip install python-dotenv PyMySQL
Requirement already satisfied: python-dotenv in /usr/local/lib/python3.6/dist-packages (0.13.0) Requirement already satisfied: PyMySQL in /usr/local/lib/python3.6/dist-packages (0.9.3)
# Retrieve CPU information from the system
ncpu = !nproc
print("The number of available CPUs is:", ncpu[0])
The number of available CPUs is: 2
import os
import sys
import smtplib
import numpy as np
import pandas as pd
import requests
import json
from email.message import EmailMessage
import matplotlib.pyplot as plt
from datetime import datetime, timedelta
from dotenv import load_dotenv
# Begin the timer for the script processing
startTimeScript = datetime.now()
# Set up the verbose flag to print detailed messages for debugging (setting True will activate!)
verbose = True
# Set up the sendNotification flag to send progress emails (setting True will send emails!)
notifyStatus = False
# Set up the parent directory location for loading the dotenv files
useColab = True
if useColab:
# Mount Google Drive locally for storing files
from google.colab import drive
drive.mount('/content/gdrive')
gdrivePrefix = '/content/gdrive/My Drive/Colab_Downloads/'
env_path = '/content/gdrive/My Drive/Colab Notebooks/'
dotenv_path = env_path + "python_script.env"
load_dotenv(dotenv_path=dotenv_path)
# Set up the dotenv file for retrieving environment variables
useLocalPC = False
if useLocalPC:
env_path = "/Users/david/PycharmProjects/"
dotenv_path = env_path + "python_script.env"
load_dotenv(dotenv_path=dotenv_path)
# Configure the plotting style
plt.style.use('seaborn')
# Set Pandas options
pd.set_option("display.max_rows", None)
pd.set_option("display.max_columns", None)
# pd.set_option("display.width", 140)
Drive already mounted at /content/gdrive; to attempt to forcibly remount, call drive.mount("/content/gdrive", force_remount=True).
stock_symbol = 'BKNG'
initial_capital = 0
# Specify the parameters for the trading strategy
fast_ma_min = 5
fast_ma_max = 20
slow_ma_min = 10
slow_ma_max = 50
ma_increment = 5
min_ma_gap = 5
model_start_date = datetime(2019, 1, 1)
print("Starting date for the model:", model_start_date)
stock_start_date = model_start_date - timedelta(days=int(slow_ma_max*1.5)) # Need more pricing data to calculate moving averages
model_end_date = datetime.now()
# model_end_date = datetime(2020, 6, 30)
print("Ending date for the model:", model_end_date)
Starting date for the model: 2019-01-01 00:00:00 Ending date for the model: 2020-06-30 21:23:04.432818
# Check and see whether the API key is available
quandl_key = os.environ.get('QUANDL_API')
if quandl_key is None: sys.exit("API key for Quandl not available. Script Processing Aborted!!!")
start_date_string = stock_start_date.strftime('%Y-%m-%d')
end_date_string = model_end_date.strftime('%Y-%m-%d')
quandl_url = "https://www.quandl.com/api/v3/datatables/SHARADAR/SEP.json?date.gte=%s&date.lte=%s&ticker=%s&api_key=%s" % (start_date_string, end_date_string, stock_symbol, quandl_key)
response = requests.get(quandl_url)
quandl_dict = json.loads(response.text)
stock_quandl = pd.DataFrame(quandl_dict['datatable']['data'])
print(len(stock_quandl), 'data points retrieved from the API call.')
427 data points retrieved from the API call.
stock_quandl.columns = ['ticker', 'date', 'open', 'high', 'low', 'close', 'volume', 'dividend', 'closeunadj', 'lastupdated']
# stock_quandl.set_index('date', inplace=True)
stock_quandl.index = pd.to_datetime(stock_quandl.date)
stock_quandl = stock_quandl.sort_index(ascending = True)
stock_quandl.info(verbose=True)
<class 'pandas.core.frame.DataFrame'> DatetimeIndex: 427 entries, 2018-10-18 to 2020-06-30 Data columns (total 10 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 ticker 427 non-null object 1 date 427 non-null object 2 open 427 non-null float64 3 high 427 non-null float64 4 low 427 non-null float64 5 close 427 non-null float64 6 volume 427 non-null float64 7 dividend 427 non-null float64 8 closeunadj 427 non-null float64 9 lastupdated 427 non-null object dtypes: float64(7), object(3) memory usage: 36.7+ KB
stock_quandl.head()
| ticker | date | open | high | low | close | volume | dividend | closeunadj | lastupdated | |
|---|---|---|---|---|---|---|---|---|---|---|
| date | ||||||||||
| 2018-10-18 | BKNG | 2018-10-18 | 1853.11 | 1859.00 | 1808.09 | 1811.71 | 351828.0 | 0.0 | 1811.71 | 2020-05-01 |
| 2018-10-19 | BKNG | 2018-10-19 | 1817.29 | 1836.02 | 1796.00 | 1805.74 | 262100.0 | 0.0 | 1805.74 | 2020-05-01 |
| 2018-10-22 | BKNG | 2018-10-22 | 1810.88 | 1851.12 | 1807.37 | 1827.29 | 269238.0 | 0.0 | 1827.29 | 2020-05-01 |
| 2018-10-23 | BKNG | 2018-10-23 | 1787.04 | 1841.52 | 1785.67 | 1830.00 | 402802.0 | 0.0 | 1830.00 | 2018-10-23 |
| 2018-10-24 | BKNG | 2018-10-24 | 1828.21 | 1847.21 | 1745.63 | 1753.58 | 533508.0 | 0.0 | 1753.58 | 2020-05-01 |
stock_quandl.tail()
| ticker | date | open | high | low | close | volume | dividend | closeunadj | lastupdated | |
|---|---|---|---|---|---|---|---|---|---|---|
| date | ||||||||||
| 2020-06-24 | BKNG | 2020-06-24 | 1660.71 | 1669.77 | 1582.00 | 1610.33 | 592115.0 | 0.0 | 1610.33 | 2020-06-24 |
| 2020-06-25 | BKNG | 2020-06-25 | 1585.81 | 1623.97 | 1561.72 | 1615.39 | 498591.0 | 0.0 | 1615.39 | 2020-06-25 |
| 2020-06-26 | BKNG | 2020-06-26 | 1597.30 | 1611.71 | 1532.83 | 1541.25 | 601775.0 | 0.0 | 1541.25 | 2020-06-26 |
| 2020-06-29 | BKNG | 2020-06-29 | 1567.77 | 1595.30 | 1540.48 | 1593.22 | 358850.0 | 0.0 | 1593.22 | 2020-06-29 |
| 2020-06-30 | BKNG | 2020-06-30 | 1583.90 | 1603.24 | 1566.42 | 1592.34 | 285504.0 | 0.0 | 1592.34 | 2020-06-30 |
title_string = 'Quandl Historical Stock Information for ' + stock_symbol
stock_quandl['close'].plot(figsize=(16,9), title=title_string)
plt.show()
# Set up the standard column name for modeling
model_template = stock_quandl.loc[:, ['open','close']]
model_template.rename(columns={'open': 'open_price', 'close': 'close_price'}, inplace=True)
if verbose: model_template.info(verbose=True)
<class 'pandas.core.frame.DataFrame'> DatetimeIndex: 427 entries, 2018-10-18 to 2020-06-30 Data columns (total 2 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 open_price 427 non-null float64 1 close_price 427 non-null float64 dtypes: float64(2) memory usage: 10.0 KB
def trading_ma_crossover(model):
waitfor_first_entry = True
for x in range(len(model)):
if model['ma_change'].iloc[x] > 0:
model['trade_signal'].iloc[x] = 1 # trade_signal = 1 means we should take a long position
else:
model['trade_signal'].iloc[x] = 0 # trade_signal = 0 means we should take a flat position
if x != 0:
model['signal_change'].iloc[x] = model['trade_signal'].iloc[x] - model['trade_signal'].iloc[x-1]
if waitfor_first_entry and (model['signal_change'].iloc[x-1] == 1):
model['entry_exit'].iloc[x] = model['signal_change'].iloc[x-1]
waitfor_first_entry = False
elif (not waitfor_first_entry) and (model['signal_change'].iloc[x-1] != 0):
model['entry_exit'].iloc[x] = model['signal_change'].iloc[x-1]
model_collection = {}
serial_number = 1
for slow_ma in range(slow_ma_min, slow_ma_max+1, ma_increment):
for fast_ma in range(fast_ma_min, fast_ma_max+1, ma_increment):
if (slow_ma - fast_ma) < min_ma_gap: break
print('Processing model with slow_ma of', slow_ma, 'and fast_ma of', fast_ma)
model_name = 'EMA_' + str(serial_number).zfill(3) + '_SlowMA_' + str(slow_ma).zfill(2) + '_FastMA_' + str(fast_ma).zfill(2)
serial_number = serial_number + 1
trading_model = model_template.copy()
trading_model['fast_ma'] = trading_model['close_price'].ewm(span=fast_ma).mean()
trading_model['slow_ma'] = trading_model['close_price'].ewm(span=slow_ma).mean()
trading_model['ma_change'] = trading_model['fast_ma'] - trading_model['slow_ma']
trading_model['trade_signal'] = np.zeros(len(trading_model))
trading_model['signal_change'] = np.zeros(len(trading_model))
trading_model['entry_exit'] = np.zeros(len(trading_model))
trading_model = trading_model[model_start_date:model_end_date]
trading_ma_crossover(trading_model)
model_collection[model_name] = trading_model.copy()
print('Model', model_name, 'added to the trading model collection.')
Processing model with slow_ma of 10 and fast_ma of 5 Model EMA_001_SlowMA_10_FastMA_05 added to the trading model collection. Processing model with slow_ma of 15 and fast_ma of 5 Model EMA_002_SlowMA_15_FastMA_05 added to the trading model collection. Processing model with slow_ma of 15 and fast_ma of 10 Model EMA_003_SlowMA_15_FastMA_10 added to the trading model collection. Processing model with slow_ma of 20 and fast_ma of 5 Model EMA_004_SlowMA_20_FastMA_05 added to the trading model collection. Processing model with slow_ma of 20 and fast_ma of 10 Model EMA_005_SlowMA_20_FastMA_10 added to the trading model collection. Processing model with slow_ma of 20 and fast_ma of 15 Model EMA_006_SlowMA_20_FastMA_15 added to the trading model collection. Processing model with slow_ma of 25 and fast_ma of 5 Model EMA_007_SlowMA_25_FastMA_05 added to the trading model collection. Processing model with slow_ma of 25 and fast_ma of 10 Model EMA_008_SlowMA_25_FastMA_10 added to the trading model collection. Processing model with slow_ma of 25 and fast_ma of 15 Model EMA_009_SlowMA_25_FastMA_15 added to the trading model collection. Processing model with slow_ma of 25 and fast_ma of 20 Model EMA_010_SlowMA_25_FastMA_20 added to the trading model collection. Processing model with slow_ma of 30 and fast_ma of 5 Model EMA_011_SlowMA_30_FastMA_05 added to the trading model collection. Processing model with slow_ma of 30 and fast_ma of 10 Model EMA_012_SlowMA_30_FastMA_10 added to the trading model collection. Processing model with slow_ma of 30 and fast_ma of 15 Model EMA_013_SlowMA_30_FastMA_15 added to the trading model collection. Processing model with slow_ma of 30 and fast_ma of 20 Model EMA_014_SlowMA_30_FastMA_20 added to the trading model collection. Processing model with slow_ma of 35 and fast_ma of 5 Model EMA_015_SlowMA_35_FastMA_05 added to the trading model collection. Processing model with slow_ma of 35 and fast_ma of 10 Model EMA_016_SlowMA_35_FastMA_10 added to the trading model collection. Processing model with slow_ma of 35 and fast_ma of 15 Model EMA_017_SlowMA_35_FastMA_15 added to the trading model collection. Processing model with slow_ma of 35 and fast_ma of 20 Model EMA_018_SlowMA_35_FastMA_20 added to the trading model collection. Processing model with slow_ma of 40 and fast_ma of 5 Model EMA_019_SlowMA_40_FastMA_05 added to the trading model collection. Processing model with slow_ma of 40 and fast_ma of 10 Model EMA_020_SlowMA_40_FastMA_10 added to the trading model collection. Processing model with slow_ma of 40 and fast_ma of 15 Model EMA_021_SlowMA_40_FastMA_15 added to the trading model collection. Processing model with slow_ma of 40 and fast_ma of 20 Model EMA_022_SlowMA_40_FastMA_20 added to the trading model collection. Processing model with slow_ma of 45 and fast_ma of 5 Model EMA_023_SlowMA_45_FastMA_05 added to the trading model collection. Processing model with slow_ma of 45 and fast_ma of 10 Model EMA_024_SlowMA_45_FastMA_10 added to the trading model collection. Processing model with slow_ma of 45 and fast_ma of 15 Model EMA_025_SlowMA_45_FastMA_15 added to the trading model collection. Processing model with slow_ma of 45 and fast_ma of 20 Model EMA_026_SlowMA_45_FastMA_20 added to the trading model collection. Processing model with slow_ma of 50 and fast_ma of 5 Model EMA_027_SlowMA_50_FastMA_05 added to the trading model collection. Processing model with slow_ma of 50 and fast_ma of 10 Model EMA_028_SlowMA_50_FastMA_10 added to the trading model collection. Processing model with slow_ma of 50 and fast_ma of 15 Model EMA_029_SlowMA_50_FastMA_15 added to the trading model collection. Processing model with slow_ma of 50 and fast_ma of 20 Model EMA_030_SlowMA_50_FastMA_20 added to the trading model collection.
# List the entry/exit points for each model
for key in model_collection:
print('List the signal change and entry/exit points for', key)
if verbose: print(model_collection[key][(model_collection[key].signal_change != 0) | (model_collection[key].entry_exit != 0)])
else: print(model_collection[key][model_collection[key].entry_exit != 0])
print()
List the signal change and entry/exit points for EMA_001_SlowMA_10_FastMA_05
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-17 1681.73 1724.51 1698.177482 1695.526150 2.651332
2019-01-18 1747.02 1760.26 1718.871654 1707.295979 11.575675
2019-02-28 1754.00 1697.04 1837.781139 1866.682948 -28.901809
2019-03-01 1708.20 1714.08 1796.547426 1838.936957 -42.389531
2019-03-20 1766.78 1774.43 1760.751611 1758.999554 1.752056
2019-03-21 1765.80 1774.36 1765.287740 1761.792363 3.495378
2019-03-22 1754.04 1721.59 1750.721827 1754.482842 -3.761015
2019-03-25 1714.01 1752.39 1751.277885 1754.102325 -2.824441
2019-03-26 1761.20 1768.87 1757.141923 1756.787357 0.354566
2019-03-27 1768.98 1752.11 1755.464615 1755.936929 -0.472313
2019-03-28 1759.99 1728.89 1746.606410 1751.019305 -4.412895
2019-04-02 1766.03 1763.55 1754.808196 1753.775457 1.032738
2019-04-03 1778.47 1774.93 1761.515464 1757.621738 3.893726
2019-05-02 1824.66 1808.00 1837.500013 1842.778845 -5.278832
2019-05-03 1816.17 1824.07 1833.023342 1839.377237 -6.353895
2019-06-05 1755.75 1765.00 1719.748369 1718.262751 1.485618
2019-06-06 1766.01 1754.86 1731.452246 1724.916796 6.535450
2019-07-17 1887.75 1867.74 1878.385727 1878.429741 -0.044014
2019-07-18 1861.83 1885.91 1880.893818 1879.789788 1.104030
2019-07-19 1896.03 1882.09 1881.292545 1880.208008 1.084537
2019-08-01 1885.47 1879.86 1900.248039 1903.080193 -2.832155
2019-08-02 1874.11 1846.08 1882.192026 1892.716522 -10.524496
2019-08-09 1926.54 1917.69 1882.501296 1876.722095 5.779200
2019-08-12 1900.44 1916.89 1893.964197 1884.025351 9.938847
2019-09-24 2012.82 1990.64 2020.845268 2025.317076 -4.471807
2019-09-25 1991.65 1993.53 2011.740179 2019.537607 -7.797429
2019-10-14 1964.52 1988.75 1971.269067 1969.762887 1.506180
2019-10-15 1992.21 2016.39 1986.309378 1978.240544 8.068834
2019-11-04 2042.00 2007.68 2030.480653 2031.528674 -1.048021
2019-11-05 2008.99 2025.43 2028.797102 2030.419824 -1.622722
2019-11-27 1893.00 1906.45 1888.982124 1886.626078 2.356046
2019-11-29 1904.89 1904.03 1893.998083 1889.790428 4.207655
2019-12-03 1865.39 1879.98 1887.201370 1887.210782 -0.009412
2019-12-04 1894.64 1921.53 1898.644247 1893.450640 5.193607
2019-12-05 1929.00 1904.22 1900.502831 1895.408705 5.094126
2020-01-17 2060.00 2054.69 2062.275286 2062.726258 -0.450973
2020-01-21 2006.00 1990.57 2038.373524 2049.606939 -11.233415
2020-02-12 1923.95 1960.36 1924.072116 1920.383765 3.688351
2020-02-13 1944.00 1959.94 1936.028078 1927.575808 8.452270
2020-02-24 1830.93 1792.54 1900.010119 1920.736442 -20.726323
2020-02-25 1803.00 1726.58 1842.200080 1885.435271 -43.235191
2020-04-07 1412.01 1376.37 1324.083823 1314.980346 9.103477
2020-04-08 1382.65 1372.06 1340.075882 1325.358465 14.717417
2020-04-22 1365.01 1355.00 1383.015777 1386.062103 -3.046326
2020-04-23 1354.05 1360.00 1375.343851 1381.323539 -5.979688
2020-04-28 1434.20 1439.32 1400.950030 1392.833253 8.116777
2020-04-29 1487.83 1520.53 1440.810020 1416.050843 24.759177
2020-05-06 1397.46 1378.91 1408.927204 1414.080972 -5.153768
2020-05-07 1392.26 1443.91 1420.588136 1419.504432 1.083705
2020-05-08 1416.69 1430.83 1424.002091 1421.563626 2.438465
2020-05-12 1401.09 1385.92 1408.418707 1413.511518 -5.092811
2020-05-13 1379.34 1366.07 1394.302471 1404.885788 -10.583316
2020-05-18 1430.00 1557.43 1444.710732 1426.836814 17.873918
2020-05-19 1556.29 1547.56 1478.993822 1448.786484 30.207337
2020-06-11 1655.85 1588.37 1703.095553 1703.129644 -0.034090
2020-06-12 1653.57 1623.92 1676.703702 1688.727890 -12.024188
trade_signal signal_change entry_exit
date
2019-01-17 1.0 1.0 0.0
2019-01-18 1.0 0.0 1.0
2019-02-28 0.0 -1.0 0.0
2019-03-01 0.0 0.0 -1.0
2019-03-20 1.0 1.0 0.0
2019-03-21 1.0 0.0 1.0
2019-03-22 0.0 -1.0 0.0
2019-03-25 0.0 0.0 -1.0
2019-03-26 1.0 1.0 0.0
2019-03-27 0.0 -1.0 1.0
2019-03-28 0.0 0.0 -1.0
2019-04-02 1.0 1.0 0.0
2019-04-03 1.0 0.0 1.0
2019-05-02 0.0 -1.0 0.0
2019-05-03 0.0 0.0 -1.0
2019-06-05 1.0 1.0 0.0
2019-06-06 1.0 0.0 1.0
2019-07-17 0.0 -1.0 0.0
2019-07-18 1.0 1.0 -1.0
2019-07-19 1.0 0.0 1.0
2019-08-01 0.0 -1.0 0.0
2019-08-02 0.0 0.0 -1.0
2019-08-09 1.0 1.0 0.0
2019-08-12 1.0 0.0 1.0
2019-09-24 0.0 -1.0 0.0
2019-09-25 0.0 0.0 -1.0
2019-10-14 1.0 1.0 0.0
2019-10-15 1.0 0.0 1.0
2019-11-04 0.0 -1.0 0.0
2019-11-05 0.0 0.0 -1.0
2019-11-27 1.0 1.0 0.0
2019-11-29 1.0 0.0 1.0
2019-12-03 0.0 -1.0 0.0
2019-12-04 1.0 1.0 -1.0
2019-12-05 1.0 0.0 1.0
2020-01-17 0.0 -1.0 0.0
2020-01-21 0.0 0.0 -1.0
2020-02-12 1.0 1.0 0.0
2020-02-13 1.0 0.0 1.0
2020-02-24 0.0 -1.0 0.0
2020-02-25 0.0 0.0 -1.0
2020-04-07 1.0 1.0 0.0
2020-04-08 1.0 0.0 1.0
2020-04-22 0.0 -1.0 0.0
2020-04-23 0.0 0.0 -1.0
2020-04-28 1.0 1.0 0.0
2020-04-29 1.0 0.0 1.0
2020-05-06 0.0 -1.0 0.0
2020-05-07 1.0 1.0 -1.0
2020-05-08 1.0 0.0 1.0
2020-05-12 0.0 -1.0 0.0
2020-05-13 0.0 0.0 -1.0
2020-05-18 1.0 1.0 0.0
2020-05-19 1.0 0.0 1.0
2020-06-11 0.0 -1.0 0.0
2020-06-12 0.0 0.0 -1.0
List the signal change and entry/exit points for EMA_002_SlowMA_15_FastMA_05
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-18 1747.02 1760.26 1718.871654 1708.877113 9.994541
2019-01-22 1743.18 1708.98 1715.574436 1708.889977 6.684460
2019-02-28 1754.00 1697.04 1837.781139 1869.015369 -31.234230
2019-03-01 1708.20 1714.08 1796.547426 1849.648346 -53.100919
2019-04-03 1778.47 1774.93 1761.515464 1758.958171 2.557293
2019-04-04 1775.31 1780.60 1767.876976 1761.663400 6.213575
2019-05-02 1824.66 1808.00 1837.500013 1838.012047 -0.512034
2019-05-03 1816.17 1824.07 1833.023342 1836.269291 -3.245949
2019-06-07 1765.25 1778.29 1747.064831 1737.323099 9.741732
2019-06-10 1782.57 1781.12 1758.416554 1742.797711 15.618842
2019-08-02 1874.11 1846.08 1882.192026 1892.559366 -10.367340
2019-08-05 1819.98 1788.60 1850.994684 1879.564445 -28.569762
2019-08-09 1926.54 1917.69 1882.501296 1877.707977 4.793319
2019-08-12 1900.44 1916.89 1893.964197 1882.605730 11.358467
2019-09-25 1991.65 1993.53 2011.740179 2014.267053 -2.526874
2019-09-26 1994.08 1978.45 2000.643453 2009.789921 -9.146469
2019-10-15 1992.21 2016.39 1986.309378 1978.537909 7.771469
2019-10-16 2016.80 2027.63 2000.082919 1984.674421 15.408498
2019-11-06 2018.56 2012.09 2023.228068 2024.770427 -1.542359
2019-11-07 1942.20 1849.93 1965.462045 2002.915373 -37.453328
2019-12-04 1894.64 1921.53 1898.644247 1896.970835 1.673411
2019-12-05 1929.00 1904.22 1900.502831 1897.876981 2.625850
2020-01-21 2006.00 1990.57 2038.373524 2047.697078 -9.323555
2020-01-22 2004.33 2000.24 2025.662349 2041.764944 -16.102594
2020-02-13 1944.00 1959.94 1936.028078 1932.772770 3.255307
2020-02-14 1998.44 1990.96 1954.338718 1940.046174 14.292544
2020-02-24 1830.93 1792.54 1900.010119 1928.359710 -28.349590
2020-02-25 1803.00 1726.58 1842.200080 1903.137246 -60.937166
2020-04-08 1382.65 1372.06 1340.075882 1336.371051 3.704831
2020-04-09 1424.76 1420.64 1366.930588 1346.904669 20.025918
2020-04-23 1354.05 1360.00 1375.343851 1379.934938 -4.591087
2020-04-24 1372.39 1362.77 1371.152567 1377.789321 -6.636753
2020-04-27 1374.93 1402.99 1381.765045 1380.939406 0.825639
2020-04-28 1434.20 1439.32 1400.950030 1388.236980 12.713050
2020-05-06 1397.46 1378.91 1408.927204 1410.330545 -1.403341
2020-05-07 1392.26 1443.91 1420.588136 1414.527977 6.060159
2020-05-08 1416.69 1430.83 1424.002091 1416.565730 7.436361
2020-05-12 1401.09 1385.92 1408.418707 1412.126262 -3.707555
2020-05-13 1379.34 1366.07 1394.302471 1406.369229 -12.066758
2020-05-18 1430.00 1557.43 1444.710732 1420.555695 24.155038
2020-05-19 1556.29 1547.56 1478.993822 1436.431233 42.562589
2020-06-15 1567.66 1650.67 1668.025801 1669.262549 -1.236748
2020-06-16 1716.32 1673.74 1669.930534 1669.822230 0.108304
2020-06-17 1677.92 1638.24 1659.367023 1665.874452 -6.507429
2020-06-18 1622.40 1628.35 1649.028015 1661.183895 -12.155880
trade_signal signal_change entry_exit
date
2019-01-18 1.0 1.0 0.0
2019-01-22 1.0 0.0 1.0
2019-02-28 0.0 -1.0 0.0
2019-03-01 0.0 0.0 -1.0
2019-04-03 1.0 1.0 0.0
2019-04-04 1.0 0.0 1.0
2019-05-02 0.0 -1.0 0.0
2019-05-03 0.0 0.0 -1.0
2019-06-07 1.0 1.0 0.0
2019-06-10 1.0 0.0 1.0
2019-08-02 0.0 -1.0 0.0
2019-08-05 0.0 0.0 -1.0
2019-08-09 1.0 1.0 0.0
2019-08-12 1.0 0.0 1.0
2019-09-25 0.0 -1.0 0.0
2019-09-26 0.0 0.0 -1.0
2019-10-15 1.0 1.0 0.0
2019-10-16 1.0 0.0 1.0
2019-11-06 0.0 -1.0 0.0
2019-11-07 0.0 0.0 -1.0
2019-12-04 1.0 1.0 0.0
2019-12-05 1.0 0.0 1.0
2020-01-21 0.0 -1.0 0.0
2020-01-22 0.0 0.0 -1.0
2020-02-13 1.0 1.0 0.0
2020-02-14 1.0 0.0 1.0
2020-02-24 0.0 -1.0 0.0
2020-02-25 0.0 0.0 -1.0
2020-04-08 1.0 1.0 0.0
2020-04-09 1.0 0.0 1.0
2020-04-23 0.0 -1.0 0.0
2020-04-24 0.0 0.0 -1.0
2020-04-27 1.0 1.0 0.0
2020-04-28 1.0 0.0 1.0
2020-05-06 0.0 -1.0 0.0
2020-05-07 1.0 1.0 -1.0
2020-05-08 1.0 0.0 1.0
2020-05-12 0.0 -1.0 0.0
2020-05-13 0.0 0.0 -1.0
2020-05-18 1.0 1.0 0.0
2020-05-19 1.0 0.0 1.0
2020-06-15 0.0 -1.0 0.0
2020-06-16 1.0 1.0 -1.0
2020-06-17 0.0 -1.0 1.0
2020-06-18 0.0 0.0 -1.0
List the signal change and entry/exit points for EMA_003_SlowMA_15_FastMA_10
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-23 1717.25 1744.31 1714.276332 1713.318232 0.958099
2019-01-24 1748.98 1795.67 1729.075207 1723.613735 5.461472
2019-02-28 1754.00 1697.04 1866.682948 1869.015369 -2.332421
2019-03-01 1708.20 1714.08 1838.936957 1849.648346 -10.711388
2019-04-04 1775.31 1780.60 1761.799604 1761.663400 0.136203
2019-04-05 1788.03 1769.45 1763.190585 1762.636726 0.553859
2019-05-07 1781.45 1785.00 1823.708564 1825.949457 -2.240894
2019-05-08 1765.01 1751.63 1810.603370 1816.659525 -6.056155
2019-06-10 1782.57 1781.12 1743.075376 1742.797711 0.277665
2019-06-11 1799.50 1803.63 1754.085308 1750.401747 3.683560
2019-08-05 1819.98 1788.60 1873.786245 1879.564445 -5.778200
2019-08-06 1799.20 1786.52 1857.919655 1867.933890 -10.014235
2019-08-12 1900.44 1916.89 1884.025351 1882.605730 1.419621
2019-08-13 1907.67 1943.19 1894.782560 1890.178764 4.603796
2019-09-27 1969.56 1944.25 1999.736745 2001.597431 -1.860686
2019-09-30 1953.00 1962.61 1992.986428 1996.724002 -3.737574
2019-10-16 2016.80 2027.63 1987.220445 1984.674421 2.546024
2019-10-17 2033.00 2028.53 1994.731273 1990.156368 4.574905
2019-11-07 1942.20 1849.93 1994.876742 2002.915373 -8.038631
2019-11-08 1941.00 1879.19 1973.842789 1987.449702 -13.606913
2019-12-09 1928.08 1905.79 1902.482191 1902.409095 0.073097
2019-12-10 1902.40 1904.63 1902.872702 1902.686708 0.185994
2020-01-22 2004.33 2000.24 2040.631132 2041.764944 -1.133812
2020-01-23 1986.24 1993.20 2032.007289 2035.694326 -3.687036
2020-02-18 1972.25 1976.28 1945.860169 1944.575402 1.284767
2020-02-19 1982.76 1968.49 1949.974684 1947.564727 2.409957
2020-02-24 1830.93 1792.54 1920.736442 1928.359710 -7.623268
2020-02-25 1803.00 1726.58 1885.435271 1903.137246 -17.701975
2020-04-13 1413.19 1421.01 1356.923766 1356.167836 0.755930
2020-04-14 1460.09 1449.42 1373.741263 1367.824356 5.916907
2020-05-13 1379.34 1366.07 1404.885788 1406.369229 -1.483442
2020-05-14 1348.74 1382.51 1400.817463 1403.386826 -2.569363
2020-05-18 1430.00 1557.43 1426.836814 1420.555695 6.281119
2020-05-19 1556.29 1547.56 1448.786484 1436.431233 12.355251
2020-06-22 1609.74 1633.52 1653.359279 1653.977201 -0.617922
2020-06-23 1652.30 1677.10 1657.675774 1656.867551 0.808223
2020-06-24 1660.71 1610.33 1649.067451 1651.050357 -1.982906
2020-06-25 1585.81 1615.39 1642.944278 1646.592812 -3.648534
trade_signal signal_change entry_exit
date
2019-01-23 1.0 1.0 0.0
2019-01-24 1.0 0.0 1.0
2019-02-28 0.0 -1.0 0.0
2019-03-01 0.0 0.0 -1.0
2019-04-04 1.0 1.0 0.0
2019-04-05 1.0 0.0 1.0
2019-05-07 0.0 -1.0 0.0
2019-05-08 0.0 0.0 -1.0
2019-06-10 1.0 1.0 0.0
2019-06-11 1.0 0.0 1.0
2019-08-05 0.0 -1.0 0.0
2019-08-06 0.0 0.0 -1.0
2019-08-12 1.0 1.0 0.0
2019-08-13 1.0 0.0 1.0
2019-09-27 0.0 -1.0 0.0
2019-09-30 0.0 0.0 -1.0
2019-10-16 1.0 1.0 0.0
2019-10-17 1.0 0.0 1.0
2019-11-07 0.0 -1.0 0.0
2019-11-08 0.0 0.0 -1.0
2019-12-09 1.0 1.0 0.0
2019-12-10 1.0 0.0 1.0
2020-01-22 0.0 -1.0 0.0
2020-01-23 0.0 0.0 -1.0
2020-02-18 1.0 1.0 0.0
2020-02-19 1.0 0.0 1.0
2020-02-24 0.0 -1.0 0.0
2020-02-25 0.0 0.0 -1.0
2020-04-13 1.0 1.0 0.0
2020-04-14 1.0 0.0 1.0
2020-05-13 0.0 -1.0 0.0
2020-05-14 0.0 0.0 -1.0
2020-05-18 1.0 1.0 0.0
2020-05-19 1.0 0.0 1.0
2020-06-22 0.0 -1.0 0.0
2020-06-23 1.0 1.0 -1.0
2020-06-24 0.0 -1.0 1.0
2020-06-25 0.0 0.0 -1.0
List the signal change and entry/exit points for EMA_004_SlowMA_20_FastMA_05
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-18 1747.02 1760.26 1718.871654 1715.352367 3.519287
2019-01-22 1743.18 1708.98 1715.574436 1714.744470 0.829966
2019-02-28 1754.00 1697.04 1837.781139 1863.366865 -25.585726
2019-03-01 1708.20 1714.08 1796.547426 1849.147492 -52.600066
2019-04-04 1775.31 1780.60 1767.876976 1764.419006 3.457970
2019-04-05 1788.03 1769.45 1768.401317 1764.898153 3.503165
2019-05-06 1798.96 1800.51 1822.185561 1828.129427 -5.943866
2019-05-07 1781.45 1785.00 1809.790374 1824.021858 -14.231484
2019-06-07 1765.25 1778.29 1747.064831 1743.395796 3.669035
2019-06-10 1782.57 1781.12 1758.416554 1746.988577 11.427977
2019-08-02 1874.11 1846.08 1882.192026 1888.706151 -6.514125
2019-08-05 1819.98 1788.60 1850.994684 1879.172232 -28.177548
2019-08-09 1926.54 1917.69 1882.501296 1877.142128 5.359167
2019-08-12 1900.44 1916.89 1893.964197 1880.927640 13.036557
2019-09-26 1994.08 1978.45 2000.643453 2002.936208 -2.292755
2019-09-27 1969.56 1944.25 1981.845635 1997.347045 -15.501410
2019-10-15 1992.21 2016.39 1986.309378 1979.020094 7.289284
2019-10-16 2016.80 2027.63 2000.082919 1983.649609 16.433309
2019-11-07 1942.20 1849.93 1965.462045 2004.764227 -39.302181
2019-11-08 1941.00 1879.19 1936.704697 1992.804776 -56.100080
2019-12-06 1923.27 1930.27 1910.425221 1906.546976 3.878245
2019-12-09 1928.08 1905.79 1908.880147 1906.474883 2.405264
2020-01-21 2006.00 1990.57 2038.373524 2041.115124 -2.741600
2020-01-22 2004.33 2000.24 2025.662349 2037.222255 -11.559906
2020-02-14 1998.44 1990.96 1954.338718 1945.383471 8.955247
2020-02-18 1972.25 1976.28 1961.652479 1948.325998 13.326481
2020-02-24 1830.93 1792.54 1900.010119 1934.982807 -34.972687
2020-02-25 1803.00 1726.58 1842.200080 1915.134920 -72.934841
2020-04-13 1413.19 1421.01 1384.957059 1372.482661 12.474398
2020-04-14 1460.09 1449.42 1406.444706 1379.810026 26.634679
2020-04-22 1365.01 1355.00 1383.015777 1387.459431 -4.443655
2020-04-23 1354.05 1360.00 1375.343851 1384.844247 -9.500396
2020-04-28 1434.20 1439.32 1400.950030 1389.875056 11.074974
2020-04-29 1487.83 1520.53 1440.810020 1402.318384 38.491636
2020-05-12 1401.09 1385.92 1408.418707 1410.757483 -2.338776
2020-05-13 1379.34 1366.07 1394.302471 1406.501532 -12.199061
2020-05-18 1430.00 1557.43 1444.710732 1417.093064 27.617668
2020-05-19 1556.29 1547.56 1478.993822 1429.518487 49.475335
2020-06-19 1654.00 1626.91 1641.655343 1646.411884 -4.756541
2020-06-22 1609.74 1633.52 1638.943562 1645.184086 -6.240523
2020-06-23 1652.30 1677.10 1651.662375 1648.223696 3.438678
2020-06-24 1660.71 1610.33 1637.884917 1644.614773 -6.729856
2020-06-25 1585.81 1615.39 1630.386611 1641.831461 -11.444850
trade_signal signal_change entry_exit
date
2019-01-18 1.0 1.0 0.0
2019-01-22 1.0 0.0 1.0
2019-02-28 0.0 -1.0 0.0
2019-03-01 0.0 0.0 -1.0
2019-04-04 1.0 1.0 0.0
2019-04-05 1.0 0.0 1.0
2019-05-06 0.0 -1.0 0.0
2019-05-07 0.0 0.0 -1.0
2019-06-07 1.0 1.0 0.0
2019-06-10 1.0 0.0 1.0
2019-08-02 0.0 -1.0 0.0
2019-08-05 0.0 0.0 -1.0
2019-08-09 1.0 1.0 0.0
2019-08-12 1.0 0.0 1.0
2019-09-26 0.0 -1.0 0.0
2019-09-27 0.0 0.0 -1.0
2019-10-15 1.0 1.0 0.0
2019-10-16 1.0 0.0 1.0
2019-11-07 0.0 -1.0 0.0
2019-11-08 0.0 0.0 -1.0
2019-12-06 1.0 1.0 0.0
2019-12-09 1.0 0.0 1.0
2020-01-21 0.0 -1.0 0.0
2020-01-22 0.0 0.0 -1.0
2020-02-14 1.0 1.0 0.0
2020-02-18 1.0 0.0 1.0
2020-02-24 0.0 -1.0 0.0
2020-02-25 0.0 0.0 -1.0
2020-04-13 1.0 1.0 0.0
2020-04-14 1.0 0.0 1.0
2020-04-22 0.0 -1.0 0.0
2020-04-23 0.0 0.0 -1.0
2020-04-28 1.0 1.0 0.0
2020-04-29 1.0 0.0 1.0
2020-05-12 0.0 -1.0 0.0
2020-05-13 0.0 0.0 -1.0
2020-05-18 1.0 1.0 0.0
2020-05-19 1.0 0.0 1.0
2020-06-19 0.0 -1.0 0.0
2020-06-22 0.0 0.0 -1.0
2020-06-23 1.0 1.0 0.0
2020-06-24 0.0 -1.0 1.0
2020-06-25 0.0 0.0 -1.0
List the signal change and entry/exit points for EMA_005_SlowMA_20_FastMA_10
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-24 1748.98 1795.67 1729.075207 1725.013153 4.062054
2019-01-25 1811.99 1802.20 1742.370643 1732.373290 9.997353
2019-03-01 1708.20 1714.08 1838.936957 1849.147492 -10.210535
2019-03-04 1723.66 1707.82 1815.097510 1835.686382 -20.588871
2019-04-08 1767.92 1788.72 1767.832297 1767.166919 0.665378
2019-04-09 1776.75 1794.47 1772.675515 1769.767231 2.908284
2019-05-07 1781.45 1785.00 1823.708564 1824.021858 -0.313295
2019-05-08 1765.01 1751.63 1810.603370 1817.127388 -6.524018
2019-06-11 1799.50 1803.63 1754.085308 1752.382999 1.702309
2019-06-12 1804.17 1798.90 1762.233433 1756.813190 5.420243
2019-08-05 1819.98 1788.60 1873.786245 1879.172232 -5.385986
2019-08-06 1799.20 1786.52 1857.919655 1870.348210 -12.428554
2019-08-12 1900.44 1916.89 1884.025351 1880.927640 3.097711
2019-08-13 1907.67 1943.19 1894.782560 1886.857388 7.925171
2019-09-30 1953.00 1962.61 1992.986428 1994.038755 -1.052327
2019-10-01 1977.00 1978.03 1990.267078 1992.514112 -2.247034
2019-10-16 2016.80 2027.63 1987.220445 1983.649609 3.570836
2019-10-17 2033.00 2028.53 1994.731273 1987.923932 6.807341
2019-11-07 1942.20 1849.93 1994.876742 2004.764227 -9.887485
2019-11-08 1941.00 1879.19 1973.842789 1992.804776 -18.961988
2019-12-12 1930.85 1948.48 1914.587511 1912.003637 2.583874
2019-12-13 1960.87 1973.60 1925.317055 1917.869957 7.447097
2020-01-23 1986.24 1993.20 2032.007289 2033.029659 -1.022370
2020-01-24 1998.00 1962.96 2019.453237 2026.356358 -6.903121
2020-02-20 1960.00 1970.91 1953.781105 1952.214343 1.566762
2020-02-21 1965.00 1928.72 1949.224540 1949.976786 -0.752246
2020-02-24 1830.93 1792.54 1920.736442 1934.982807 -14.246365
2020-04-16 1432.35 1407.40 1387.428283 1386.297958 1.130325
2020-04-17 1469.00 1470.87 1402.599505 1394.352438 8.247066
2020-04-22 1365.01 1355.00 1386.062103 1387.459431 -1.397329
2020-04-23 1354.05 1360.00 1381.323539 1384.844247 -3.520709
2020-04-28 1434.20 1439.32 1392.833253 1389.875056 2.958197
2020-04-29 1487.83 1520.53 1416.050843 1402.318384 13.732459
2020-05-13 1379.34 1366.07 1404.885788 1406.501532 -1.615744
2020-05-14 1348.74 1382.51 1400.817463 1404.216624 -3.399162
2020-05-18 1430.00 1557.43 1426.836814 1417.093064 9.743750
2020-05-19 1556.29 1547.56 1448.786484 1429.518487 19.267997
2020-06-26 1597.30 1541.25 1624.454410 1632.252274 -7.797865
2020-06-29 1567.77 1593.22 1618.775426 1628.534915 -9.759489
trade_signal signal_change entry_exit
date
2019-01-24 1.0 1.0 0.0
2019-01-25 1.0 0.0 1.0
2019-03-01 0.0 -1.0 0.0
2019-03-04 0.0 0.0 -1.0
2019-04-08 1.0 1.0 0.0
2019-04-09 1.0 0.0 1.0
2019-05-07 0.0 -1.0 0.0
2019-05-08 0.0 0.0 -1.0
2019-06-11 1.0 1.0 0.0
2019-06-12 1.0 0.0 1.0
2019-08-05 0.0 -1.0 0.0
2019-08-06 0.0 0.0 -1.0
2019-08-12 1.0 1.0 0.0
2019-08-13 1.0 0.0 1.0
2019-09-30 0.0 -1.0 0.0
2019-10-01 0.0 0.0 -1.0
2019-10-16 1.0 1.0 0.0
2019-10-17 1.0 0.0 1.0
2019-11-07 0.0 -1.0 0.0
2019-11-08 0.0 0.0 -1.0
2019-12-12 1.0 1.0 0.0
2019-12-13 1.0 0.0 1.0
2020-01-23 0.0 -1.0 0.0
2020-01-24 0.0 0.0 -1.0
2020-02-20 1.0 1.0 0.0
2020-02-21 0.0 -1.0 1.0
2020-02-24 0.0 0.0 -1.0
2020-04-16 1.0 1.0 0.0
2020-04-17 1.0 0.0 1.0
2020-04-22 0.0 -1.0 0.0
2020-04-23 0.0 0.0 -1.0
2020-04-28 1.0 1.0 0.0
2020-04-29 1.0 0.0 1.0
2020-05-13 0.0 -1.0 0.0
2020-05-14 0.0 0.0 -1.0
2020-05-18 1.0 1.0 0.0
2020-05-19 1.0 0.0 1.0
2020-06-26 0.0 -1.0 0.0
2020-06-29 0.0 0.0 -1.0
List the signal change and entry/exit points for EMA_006_SlowMA_20_FastMA_15
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-25 1811.99 1802.20 1733.438297 1732.373290 1.065007
2019-01-28 1787.62 1813.60 1743.459652 1740.117744 3.341907
2019-03-04 1723.66 1707.82 1831.919720 1835.686382 -3.766661
2019-03-05 1715.00 1745.93 1821.170962 1827.137379 -5.966417
2019-04-10 1793.85 1806.00 1774.035152 1773.217994 0.817157
2019-04-11 1810.00 1818.59 1779.604508 1777.539164 2.065344
2019-05-08 1765.01 1751.63 1816.659525 1817.127388 -0.467863
2019-05-09 1729.43 1736.03 1806.580834 1809.403821 -2.822986
2019-06-13 1802.05 1809.52 1763.096025 1761.832887 1.263139
2019-06-14 1808.20 1775.50 1764.646522 1763.134517 1.512006
2019-08-06 1799.20 1786.52 1867.933890 1870.348210 -2.414320
2019-08-07 1758.40 1821.56 1862.137153 1865.701713 -3.564560
2019-08-09 1926.54 1917.69 1877.707977 1877.142128 0.565849
2019-08-12 1900.44 1916.89 1882.605730 1880.927640 1.678090
2019-10-03 1936.55 1961.45 1984.478990 1985.154681 -0.675691
2019-10-04 1970.64 1983.20 1984.319116 1984.968521 -0.649405
2019-10-16 2016.80 2027.63 1984.674421 1983.649609 1.024811
2019-10-17 2033.00 2028.53 1990.156368 1987.923932 2.232436
2019-11-07 1942.20 1849.93 2002.915373 2004.764227 -1.848853
2019-11-08 1941.00 1879.19 1987.449702 1992.804776 -5.355075
2019-12-13 1960.87 1973.60 1918.779181 1917.869957 0.909224
2019-12-16 1983.47 1995.02 1928.309284 1925.217581 3.091703
2020-01-27 1906.41 1908.89 2011.888468 2015.169086 -3.280618
2020-01-28 1914.67 1917.45 2000.083660 2005.862506 -5.778847
2020-04-29 1487.83 1520.53 1404.773607 1402.318384 2.455223
2020-04-30 1514.53 1480.57 1414.248156 1409.770919 4.477238
2020-05-13 1379.34 1366.07 1406.369229 1406.501532 -0.132303
2020-05-14 1348.74 1382.51 1403.386826 1404.216624 -0.829799
2020-05-18 1430.00 1557.43 1420.555695 1417.093064 3.462630
2020-05-19 1556.29 1547.56 1436.431233 1429.518487 6.912746
2020-06-29 1567.77 1593.22 1628.399341 1628.534915 -0.135574
2020-06-30 1583.90 1592.34 1623.891923 1625.087780 -1.195857
trade_signal signal_change entry_exit
date
2019-01-25 1.0 1.0 0.0
2019-01-28 1.0 0.0 1.0
2019-03-04 0.0 -1.0 0.0
2019-03-05 0.0 0.0 -1.0
2019-04-10 1.0 1.0 0.0
2019-04-11 1.0 0.0 1.0
2019-05-08 0.0 -1.0 0.0
2019-05-09 0.0 0.0 -1.0
2019-06-13 1.0 1.0 0.0
2019-06-14 1.0 0.0 1.0
2019-08-06 0.0 -1.0 0.0
2019-08-07 0.0 0.0 -1.0
2019-08-09 1.0 1.0 0.0
2019-08-12 1.0 0.0 1.0
2019-10-03 0.0 -1.0 0.0
2019-10-04 0.0 0.0 -1.0
2019-10-16 1.0 1.0 0.0
2019-10-17 1.0 0.0 1.0
2019-11-07 0.0 -1.0 0.0
2019-11-08 0.0 0.0 -1.0
2019-12-13 1.0 1.0 0.0
2019-12-16 1.0 0.0 1.0
2020-01-27 0.0 -1.0 0.0
2020-01-28 0.0 0.0 -1.0
2020-04-29 1.0 1.0 0.0
2020-04-30 1.0 0.0 1.0
2020-05-13 0.0 -1.0 0.0
2020-05-14 0.0 0.0 -1.0
2020-05-18 1.0 1.0 0.0
2020-05-19 1.0 0.0 1.0
2020-06-29 0.0 -1.0 0.0
2020-06-30 0.0 0.0 -1.0
List the signal change and entry/exit points for EMA_007_SlowMA_25_FastMA_05
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-23 1717.25 1744.31 1725.152958 1723.725275 1.427683
2019-01-24 1748.98 1795.67 1748.658638 1729.287731 19.370907
2019-02-28 1754.00 1697.04 1837.781139 1855.905790 -18.124650
2019-03-01 1708.20 1714.08 1796.547426 1844.988619 -48.441193
2019-04-05 1788.03 1769.45 1768.401317 1768.017433 0.383885
2019-04-08 1767.92 1788.72 1775.174211 1769.610074 5.564137
2019-05-06 1798.96 1800.51 1822.185561 1824.165952 -1.980390
2019-05-07 1781.45 1785.00 1809.790374 1821.153134 -11.362760
2019-06-10 1782.57 1781.12 1758.416554 1751.894852 6.521702
2019-06-11 1799.50 1803.63 1773.487703 1755.874489 17.613214
2019-08-02 1874.11 1846.08 1882.192026 1883.380479 -1.188453
2019-08-05 1819.98 1788.60 1850.994684 1876.089672 -25.094988
2019-08-09 1926.54 1917.69 1882.501296 1874.906184 7.595112
2019-08-12 1900.44 1916.89 1893.964197 1878.135709 15.828488
2019-09-27 1969.56 1944.25 1981.845635 1990.934963 -9.089328
2019-09-30 1953.00 1962.61 1975.433757 1988.756120 -13.322363
2019-10-15 1992.21 2016.39 1986.309378 1978.152325 8.157053
2019-10-16 2016.80 2027.63 2000.082919 1981.958300 18.124619
2019-11-07 1942.20 1849.93 1965.462045 2004.202410 -38.740365
2019-11-08 1941.00 1879.19 1936.704697 1994.586071 -57.881374
2019-12-11 1915.90 1925.88 1913.602288 1912.448044 1.154244
2019-12-12 1930.85 1948.48 1925.228192 1915.219733 10.008459
2020-01-22 2004.33 2000.24 2025.662349 2030.967706 -5.305357
2020-01-23 1986.24 1993.20 2014.841566 2028.062498 -13.220932
2020-02-14 1998.44 1990.96 1954.338718 1950.692195 3.646524
2020-02-18 1972.25 1976.28 1961.652479 1952.660487 8.991992
2020-02-24 1830.93 1792.54 1900.010119 1940.797474 -40.787354
2020-02-25 1803.00 1726.58 1842.200080 1924.319206 -82.119127
2020-04-14 1460.09 1449.42 1406.444706 1401.194591 5.250115
2020-04-15 1407.84 1424.61 1412.499804 1402.995776 9.504028
2020-04-21 1382.81 1342.22 1397.023665 1403.649005 -6.625340
2020-04-22 1365.01 1355.00 1383.015777 1399.906774 -16.890997
2020-04-28 1434.20 1439.32 1400.950030 1398.308955 2.641075
2020-04-29 1487.83 1520.53 1440.810020 1407.710574 33.099446
2020-05-06 1397.46 1378.91 1408.927204 1411.385611 -2.458407
2020-05-07 1392.26 1443.91 1420.588136 1413.887487 6.700649
2020-05-08 1416.69 1430.83 1424.002091 1415.190757 8.811333
2020-05-12 1401.09 1385.92 1408.418707 1412.641592 -4.222885
2020-05-13 1379.34 1366.07 1394.302471 1409.059162 -14.756691
2020-05-18 1430.00 1557.43 1444.710732 1416.974830 27.735902
2020-05-19 1556.29 1547.56 1478.993822 1427.019843 51.973978
2020-06-25 1585.81 1615.39 1630.386611 1632.826369 -2.439757
2020-06-26 1597.30 1541.25 1600.674407 1625.782032 -25.107625
trade_signal signal_change entry_exit
date
2019-01-23 1.0 1.0 0.0
2019-01-24 1.0 0.0 1.0
2019-02-28 0.0 -1.0 0.0
2019-03-01 0.0 0.0 -1.0
2019-04-05 1.0 1.0 0.0
2019-04-08 1.0 0.0 1.0
2019-05-06 0.0 -1.0 0.0
2019-05-07 0.0 0.0 -1.0
2019-06-10 1.0 1.0 0.0
2019-06-11 1.0 0.0 1.0
2019-08-02 0.0 -1.0 0.0
2019-08-05 0.0 0.0 -1.0
2019-08-09 1.0 1.0 0.0
2019-08-12 1.0 0.0 1.0
2019-09-27 0.0 -1.0 0.0
2019-09-30 0.0 0.0 -1.0
2019-10-15 1.0 1.0 0.0
2019-10-16 1.0 0.0 1.0
2019-11-07 0.0 -1.0 0.0
2019-11-08 0.0 0.0 -1.0
2019-12-11 1.0 1.0 0.0
2019-12-12 1.0 0.0 1.0
2020-01-22 0.0 -1.0 0.0
2020-01-23 0.0 0.0 -1.0
2020-02-14 1.0 1.0 0.0
2020-02-18 1.0 0.0 1.0
2020-02-24 0.0 -1.0 0.0
2020-02-25 0.0 0.0 -1.0
2020-04-14 1.0 1.0 0.0
2020-04-15 1.0 0.0 1.0
2020-04-21 0.0 -1.0 0.0
2020-04-22 0.0 0.0 -1.0
2020-04-28 1.0 1.0 0.0
2020-04-29 1.0 0.0 1.0
2020-05-06 0.0 -1.0 0.0
2020-05-07 1.0 1.0 -1.0
2020-05-08 1.0 0.0 1.0
2020-05-12 0.0 -1.0 0.0
2020-05-13 0.0 0.0 -1.0
2020-05-18 1.0 1.0 0.0
2020-05-19 1.0 0.0 1.0
2020-06-25 0.0 -1.0 0.0
2020-06-26 0.0 0.0 -1.0
List the signal change and entry/exit points for EMA_008_SlowMA_25_FastMA_10
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-25 1811.99 1802.20 1742.370643 1734.922781 7.447862
2019-01-28 1787.62 1813.60 1755.321450 1741.001176 14.320275
2019-03-01 1708.20 1714.08 1838.936957 1844.988619 -6.051661
2019-03-04 1723.66 1707.82 1815.097510 1834.430496 -19.332985
2019-04-09 1776.75 1794.47 1772.675515 1771.522527 1.152988
2019-04-10 1793.85 1806.00 1778.734513 1774.174834 4.559678
2019-05-08 1765.01 1751.63 1810.603370 1815.805115 -5.201745
2019-05-09 1729.43 1736.03 1797.044576 1809.668478 -12.623902
2019-06-12 1804.17 1798.90 1762.233433 1759.184151 3.049282
2019-06-13 1802.05 1809.52 1770.830991 1763.056148 7.774843
2019-08-05 1819.98 1788.60 1873.786245 1876.089672 -2.303427
2019-08-06 1799.20 1786.52 1857.919655 1869.199696 -11.280041
2019-08-09 1926.54 1917.69 1876.722095 1874.906184 1.815911
2019-08-12 1900.44 1916.89 1884.025351 1878.135709 5.889642
2019-10-02 1969.00 1941.44 1981.389427 1984.354800 -2.965373
2019-10-03 1936.55 1961.45 1977.764077 1982.592892 -4.828816
2019-10-15 1992.21 2016.39 1978.240544 1978.152325 0.088219
2019-10-16 2016.80 2027.63 1987.220445 1981.958300 5.262145
2019-11-07 1942.20 1849.93 1994.876742 2004.202410 -9.325668
2019-11-08 1941.00 1879.19 1973.842789 1994.586071 -20.743282
2019-12-13 1960.87 1973.60 1925.317055 1919.710523 5.606532
2019-12-16 1983.47 1995.02 1937.990317 1925.503559 12.486758
2020-01-24 1998.00 1962.96 2019.453237 2023.054613 -3.601377
2020-01-27 1906.41 1908.89 1999.350830 2014.272720 -14.921890
2020-04-29 1487.83 1520.53 1416.050843 1407.710574 8.340269
2020-04-30 1514.53 1480.57 1427.781599 1413.315145 14.466454
2020-05-13 1379.34 1366.07 1404.885788 1409.059162 -4.173374
2020-05-14 1348.74 1382.51 1400.817463 1407.016919 -6.199456
2020-05-18 1430.00 1557.43 1426.836814 1416.974830 9.861984
2020-05-19 1556.29 1547.56 1448.786484 1427.019843 21.766641
2020-06-26 1597.30 1541.25 1624.454410 1625.782032 -1.327623
2020-06-29 1567.77 1593.22 1618.775426 1623.277261 -4.501835
trade_signal signal_change entry_exit
date
2019-01-25 1.0 1.0 0.0
2019-01-28 1.0 0.0 1.0
2019-03-01 0.0 -1.0 0.0
2019-03-04 0.0 0.0 -1.0
2019-04-09 1.0 1.0 0.0
2019-04-10 1.0 0.0 1.0
2019-05-08 0.0 -1.0 0.0
2019-05-09 0.0 0.0 -1.0
2019-06-12 1.0 1.0 0.0
2019-06-13 1.0 0.0 1.0
2019-08-05 0.0 -1.0 0.0
2019-08-06 0.0 0.0 -1.0
2019-08-09 1.0 1.0 0.0
2019-08-12 1.0 0.0 1.0
2019-10-02 0.0 -1.0 0.0
2019-10-03 0.0 0.0 -1.0
2019-10-15 1.0 1.0 0.0
2019-10-16 1.0 0.0 1.0
2019-11-07 0.0 -1.0 0.0
2019-11-08 0.0 0.0 -1.0
2019-12-13 1.0 1.0 0.0
2019-12-16 1.0 0.0 1.0
2020-01-24 0.0 -1.0 0.0
2020-01-27 0.0 0.0 -1.0
2020-04-29 1.0 1.0 0.0
2020-04-30 1.0 0.0 1.0
2020-05-13 0.0 -1.0 0.0
2020-05-14 0.0 0.0 -1.0
2020-05-18 1.0 1.0 0.0
2020-05-19 1.0 0.0 1.0
2020-06-26 0.0 -1.0 0.0
2020-06-29 0.0 0.0 -1.0
List the signal change and entry/exit points for EMA_009_SlowMA_25_FastMA_15
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-28 1787.62 1813.60 1743.459652 1741.001176 2.458476
2019-01-29 1816.62 1808.80 1751.628009 1746.237383 5.390626
2019-03-04 1723.66 1707.82 1831.919720 1834.430496 -2.510775
2019-03-05 1715.00 1745.93 1821.170962 1827.618781 -6.447819
2019-04-11 1810.00 1818.59 1779.604508 1777.591616 2.012892
2019-04-12 1827.87 1833.07 1786.287695 1781.859449 4.428246
2019-05-09 1729.43 1736.03 1806.580834 1809.668478 -3.087643
2019-05-10 1825.00 1829.85 1809.489480 1811.220924 -1.731443
2019-06-13 1802.05 1809.52 1763.096025 1763.056148 0.039877
2019-06-14 1808.20 1775.50 1764.646522 1764.013369 0.633153
2019-08-06 1799.20 1786.52 1867.933890 1869.199696 -1.265807
2019-08-07 1758.40 1821.56 1862.137153 1865.535104 -3.397950
2019-08-08 1900.00 1941.01 1871.996259 1871.340866 0.655394
2019-08-09 1926.54 1917.69 1877.707977 1874.906184 2.801793
2019-10-07 1971.01 1951.56 1980.224227 1980.248855 -0.024628
2019-10-08 1937.05 1938.19 1974.969948 1977.013558 -2.043610
2019-10-15 1992.21 2016.39 1978.537909 1978.152325 0.385584
2019-10-16 2016.80 2027.63 1984.674421 1981.958300 2.716121
2019-11-07 1942.20 1849.93 2002.915373 2004.202410 -1.287037
2019-11-08 1941.00 1879.19 1987.449702 1994.586071 -7.136369
2019-12-16 1983.47 1995.02 1928.309284 1925.503559 2.805724
2019-12-17 2000.00 2001.87 1937.504373 1931.377901 6.126472
2020-01-27 1906.41 1908.89 2011.888468 2014.272720 -2.384252
2020-01-28 1914.67 1917.45 2000.083660 2006.824819 -6.741159
2020-04-30 1514.53 1480.57 1414.248156 1413.315145 0.933011
2020-05-01 1442.75 1448.79 1418.565887 1416.043980 2.521907
2020-05-06 1397.46 1378.91 1410.330545 1411.385611 -1.055066
2020-05-07 1392.26 1443.91 1414.527977 1413.887487 0.640490
2020-05-08 1416.69 1430.83 1416.565730 1415.190757 1.374973
2020-05-12 1401.09 1385.92 1412.126262 1412.641592 -0.515330
2020-05-13 1379.34 1366.07 1406.369229 1409.059162 -2.689933
2020-05-18 1430.00 1557.43 1420.555695 1416.974830 3.580864
2020-05-19 1556.29 1547.56 1436.431233 1427.019843 9.411390
trade_signal signal_change entry_exit
date
2019-01-28 1.0 1.0 0.0
2019-01-29 1.0 0.0 1.0
2019-03-04 0.0 -1.0 0.0
2019-03-05 0.0 0.0 -1.0
2019-04-11 1.0 1.0 0.0
2019-04-12 1.0 0.0 1.0
2019-05-09 0.0 -1.0 0.0
2019-05-10 0.0 0.0 -1.0
2019-06-13 1.0 1.0 0.0
2019-06-14 1.0 0.0 1.0
2019-08-06 0.0 -1.0 0.0
2019-08-07 0.0 0.0 -1.0
2019-08-08 1.0 1.0 0.0
2019-08-09 1.0 0.0 1.0
2019-10-07 0.0 -1.0 0.0
2019-10-08 0.0 0.0 -1.0
2019-10-15 1.0 1.0 0.0
2019-10-16 1.0 0.0 1.0
2019-11-07 0.0 -1.0 0.0
2019-11-08 0.0 0.0 -1.0
2019-12-16 1.0 1.0 0.0
2019-12-17 1.0 0.0 1.0
2020-01-27 0.0 -1.0 0.0
2020-01-28 0.0 0.0 -1.0
2020-04-30 1.0 1.0 0.0
2020-05-01 1.0 0.0 1.0
2020-05-06 0.0 -1.0 0.0
2020-05-07 1.0 1.0 -1.0
2020-05-08 1.0 0.0 1.0
2020-05-12 0.0 -1.0 0.0
2020-05-13 0.0 0.0 -1.0
2020-05-18 1.0 1.0 0.0
2020-05-19 1.0 0.0 1.0
List the signal change and entry/exit points for EMA_010_SlowMA_25_FastMA_20
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-29 1816.62 1808.80 1746.665472 1746.237383 0.428089
2019-01-30 1825.33 1818.70 1753.532129 1751.832057 1.700071
2019-03-05 1715.00 1745.93 1827.137379 1827.618781 -0.481402
2019-03-06 1748.37 1751.62 1819.944657 1821.769562 -1.824905
2019-04-12 1827.87 1833.07 1782.827844 1781.859449 0.968395
2019-04-15 1834.00 1846.23 1788.866175 1786.811314 2.054860
2019-05-09 1729.43 1736.03 1809.403821 1809.668478 -0.264657
2019-05-10 1825.00 1829.85 1811.351077 1811.220924 0.130154
2019-05-13 1800.00 1777.26 1808.104306 1808.608512 -0.504206
2019-05-14 1787.12 1793.67 1806.729609 1807.459382 -0.729773
2019-06-18 1808.38 1808.99 1769.076464 1768.708382 0.368082
2019-06-19 1812.00 1842.06 1776.027277 1774.350823 1.676455
2019-10-09 1953.72 1943.33 1974.367572 1974.422515 -0.054943
2019-10-10 1942.69 1962.91 1973.276375 1973.536937 -0.260563
2019-10-14 1964.52 1988.75 1975.086420 1974.965852 0.120568
2019-10-15 1992.21 2016.39 1979.020094 1978.152325 0.867769
2019-11-08 1941.00 1879.19 1992.804776 1994.586071 -1.781294
2019-11-11 1869.00 1896.04 1983.589083 1987.005604 -3.416520
2019-12-17 2000.00 2001.87 1932.517811 1931.377901 1.139910
2019-12-18 2008.67 1991.51 1938.136115 1936.003447 2.132668
2020-01-28 1914.67 1917.45 2005.862506 2006.824819 -0.962312
2020-01-29 1924.04 1893.95 1995.204172 1998.142140 -2.937968
2020-05-18 1430.00 1557.43 1417.093064 1416.974830 0.118234
2020-05-19 1556.29 1547.56 1429.518487 1427.019843 2.498643
trade_signal signal_change entry_exit
date
2019-01-29 1.0 1.0 0.0
2019-01-30 1.0 0.0 1.0
2019-03-05 0.0 -1.0 0.0
2019-03-06 0.0 0.0 -1.0
2019-04-12 1.0 1.0 0.0
2019-04-15 1.0 0.0 1.0
2019-05-09 0.0 -1.0 0.0
2019-05-10 1.0 1.0 -1.0
2019-05-13 0.0 -1.0 1.0
2019-05-14 0.0 0.0 -1.0
2019-06-18 1.0 1.0 0.0
2019-06-19 1.0 0.0 1.0
2019-10-09 0.0 -1.0 0.0
2019-10-10 0.0 0.0 -1.0
2019-10-14 1.0 1.0 0.0
2019-10-15 1.0 0.0 1.0
2019-11-08 0.0 -1.0 0.0
2019-11-11 0.0 0.0 -1.0
2019-12-17 1.0 1.0 0.0
2019-12-18 1.0 0.0 1.0
2020-01-28 0.0 -1.0 0.0
2020-01-29 0.0 0.0 -1.0
2020-05-18 1.0 1.0 0.0
2020-05-19 1.0 0.0 1.0
List the signal change and entry/exit points for EMA_011_SlowMA_30_FastMA_05
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-24 1748.98 1795.67 1748.658638 1734.412834 14.245804
2019-01-25 1811.99 1802.20 1766.505759 1738.836929 27.668830
2019-02-28 1754.00 1697.04 1837.781139 1848.849214 -11.068075
2019-03-01 1708.20 1714.08 1796.547426 1840.134262 -43.586836
2019-04-08 1767.92 1788.72 1775.174211 1772.181645 2.992567
2019-04-09 1776.75 1794.47 1781.606141 1773.620153 7.985988
2019-05-07 1781.45 1785.00 1809.790374 1818.387194 -8.596820
2019-05-08 1765.01 1751.63 1790.403583 1814.079844 -23.676262
2019-06-10 1782.57 1781.12 1758.416554 1756.422406 1.994148
2019-06-11 1799.50 1803.63 1773.487703 1759.468124 14.019579
2019-08-05 1819.98 1788.60 1850.994684 1871.933631 -20.938948
2019-08-06 1799.20 1786.52 1829.503123 1866.423066 -36.919943
2019-08-09 1926.54 1917.69 1882.501296 1871.699253 10.802043
2019-08-12 1900.44 1916.89 1893.964197 1874.614788 19.349409
2019-09-27 1969.56 1944.25 1981.845635 1983.828158 -1.982523
2019-09-30 1953.00 1962.61 1975.433757 1982.459245 -7.025488
2019-10-15 1992.21 2016.39 1986.309378 1976.017946 10.291432
2019-10-16 2016.80 2027.63 2000.082919 1979.347756 20.735162
2019-11-07 1942.20 1849.93 1965.462045 2002.371512 -36.909467
2019-11-08 1941.00 1879.19 1936.704697 1994.424318 -57.719621
2019-12-12 1930.85 1948.48 1925.228192 1919.054665 6.173526
2019-12-13 1960.87 1973.60 1941.352128 1922.573719 18.778409
2020-01-23 1986.24 1993.20 2014.841566 2022.660375 -7.818809
2020-01-24 1998.00 1962.96 1997.547711 2018.808738 -21.261027
2020-02-18 1972.25 1976.28 1961.652479 1956.316252 5.336227
2020-02-19 1982.76 1968.49 1963.931653 1957.101655 6.829997
2020-02-21 1965.00 1928.72 1953.745179 1956.103967 -2.358788
2020-02-24 1830.93 1792.54 1900.010119 1945.551453 -45.541334
2020-04-17 1469.00 1470.87 1430.823246 1428.187807 2.635440
2020-04-20 1462.05 1411.63 1424.425497 1427.119561 -2.694064
2020-04-21 1382.81 1342.22 1397.023665 1421.642170 -24.618505
2020-04-29 1487.83 1520.53 1440.810020 1418.800304 22.009716
2020-04-30 1514.53 1480.57 1454.063347 1422.785446 31.277901
2020-05-06 1397.46 1378.91 1408.927204 1419.007123 -10.079919
2020-05-07 1392.26 1443.91 1420.588136 1420.613760 -0.025624
2020-05-08 1416.69 1430.83 1424.002091 1421.272872 2.729218
2020-05-11 1427.02 1411.00 1419.668061 1420.610106 -0.942046
2020-05-12 1401.09 1385.92 1408.418707 1418.372035 -9.953328
2020-05-18 1430.00 1557.43 1444.710732 1420.500514 24.210218
2020-05-19 1556.29 1547.56 1478.993822 1428.697900 50.295921
2020-06-26 1597.30 1541.25 1600.674407 1617.470524 -16.796117
2020-06-29 1567.77 1593.22 1598.189605 1615.905974 -17.716369
trade_signal signal_change entry_exit
date
2019-01-24 1.0 1.0 0.0
2019-01-25 1.0 0.0 1.0
2019-02-28 0.0 -1.0 0.0
2019-03-01 0.0 0.0 -1.0
2019-04-08 1.0 1.0 0.0
2019-04-09 1.0 0.0 1.0
2019-05-07 0.0 -1.0 0.0
2019-05-08 0.0 0.0 -1.0
2019-06-10 1.0 1.0 0.0
2019-06-11 1.0 0.0 1.0
2019-08-05 0.0 -1.0 0.0
2019-08-06 0.0 0.0 -1.0
2019-08-09 1.0 1.0 0.0
2019-08-12 1.0 0.0 1.0
2019-09-27 0.0 -1.0 0.0
2019-09-30 0.0 0.0 -1.0
2019-10-15 1.0 1.0 0.0
2019-10-16 1.0 0.0 1.0
2019-11-07 0.0 -1.0 0.0
2019-11-08 0.0 0.0 -1.0
2019-12-12 1.0 1.0 0.0
2019-12-13 1.0 0.0 1.0
2020-01-23 0.0 -1.0 0.0
2020-01-24 0.0 0.0 -1.0
2020-02-18 1.0 1.0 0.0
2020-02-19 1.0 0.0 1.0
2020-02-21 0.0 -1.0 0.0
2020-02-24 0.0 0.0 -1.0
2020-04-17 1.0 1.0 0.0
2020-04-20 0.0 -1.0 1.0
2020-04-21 0.0 0.0 -1.0
2020-04-29 1.0 1.0 0.0
2020-04-30 1.0 0.0 1.0
2020-05-06 0.0 -1.0 0.0
2020-05-07 0.0 0.0 -1.0
2020-05-08 1.0 1.0 0.0
2020-05-11 0.0 -1.0 1.0
2020-05-12 0.0 0.0 -1.0
2020-05-18 1.0 1.0 0.0
2020-05-19 1.0 0.0 1.0
2020-06-26 0.0 -1.0 0.0
2020-06-29 0.0 0.0 -1.0
List the signal change and entry/exit points for EMA_012_SlowMA_30_FastMA_10
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-25 1811.99 1802.20 1742.370643 1738.836929 3.533714
2019-01-28 1787.62 1813.60 1755.321450 1743.712653 11.608797
2019-03-01 1708.20 1714.08 1838.936957 1840.134262 -1.197305
2019-03-04 1723.66 1707.82 1815.097510 1831.579342 -16.481831
2019-04-10 1793.85 1806.00 1778.734513 1775.709923 3.024590
2019-04-11 1810.00 1818.59 1785.980965 1778.477305 7.503660
2019-05-08 1765.01 1751.63 1810.603370 1814.079844 -3.476474
2019-05-09 1729.43 1736.03 1797.044576 1809.043896 -11.999321
2019-06-12 1804.17 1798.90 1762.233433 1762.012167 0.221266
2019-06-13 1802.05 1809.52 1770.830991 1765.077247 5.753744
2019-08-06 1799.20 1786.52 1857.919655 1866.423066 -8.503411
2019-08-07 1758.40 1821.56 1851.308809 1863.528670 -12.219861
2019-08-09 1926.54 1917.69 1876.722095 1871.699253 5.022842
2019-08-12 1900.44 1916.89 1884.025351 1874.614788 9.410562
2019-10-03 1936.55 1961.45 1977.764077 1978.378067 -0.613990
2019-10-04 1970.64 1983.20 1978.752426 1978.689159 0.063267
2019-10-07 1971.01 1951.56 1973.808349 1976.938891 -3.130542
2019-10-08 1937.05 1938.19 1967.332285 1974.438962 -7.106677
2019-10-15 1992.21 2016.39 1978.240544 1976.017946 2.222598
2019-10-16 2016.80 2027.63 1987.220445 1979.347756 7.872689
2019-11-07 1942.20 1849.93 1994.876742 2002.371512 -7.494771
2019-11-08 1941.00 1879.19 1973.842789 1994.424318 -20.581529
2019-12-13 1960.87 1973.60 1925.317055 1922.573719 2.743335
2019-12-16 1983.47 1995.02 1937.990317 1927.247673 10.742645
2020-01-27 1906.41 1908.89 1999.350830 2011.717206 -12.366376
2020-01-28 1914.67 1917.45 1984.459770 2005.635451 -21.175681
2020-04-30 1514.53 1480.57 1427.781599 1422.785446 4.996154
2020-05-01 1442.75 1448.79 1431.601308 1424.463159 7.138150
2020-05-06 1397.46 1378.91 1414.080972 1419.007123 -4.926151
2020-05-07 1392.26 1443.91 1419.504432 1420.613760 -1.109328
2020-05-08 1416.69 1430.83 1421.563626 1421.272872 0.290754
2020-05-11 1427.02 1411.00 1419.642967 1420.610106 -0.967140
2020-05-12 1401.09 1385.92 1413.511518 1418.372035 -4.860517
2020-05-18 1430.00 1557.43 1426.836814 1420.500514 6.336300
2020-05-19 1556.29 1547.56 1448.786484 1428.697900 20.088584
2020-06-30 1583.90 1592.34 1613.968985 1614.385589 -0.416604
trade_signal signal_change entry_exit
date
2019-01-25 1.0 1.0 0.0
2019-01-28 1.0 0.0 1.0
2019-03-01 0.0 -1.0 0.0
2019-03-04 0.0 0.0 -1.0
2019-04-10 1.0 1.0 0.0
2019-04-11 1.0 0.0 1.0
2019-05-08 0.0 -1.0 0.0
2019-05-09 0.0 0.0 -1.0
2019-06-12 1.0 1.0 0.0
2019-06-13 1.0 0.0 1.0
2019-08-06 0.0 -1.0 0.0
2019-08-07 0.0 0.0 -1.0
2019-08-09 1.0 1.0 0.0
2019-08-12 1.0 0.0 1.0
2019-10-03 0.0 -1.0 0.0
2019-10-04 1.0 1.0 -1.0
2019-10-07 0.0 -1.0 1.0
2019-10-08 0.0 0.0 -1.0
2019-10-15 1.0 1.0 0.0
2019-10-16 1.0 0.0 1.0
2019-11-07 0.0 -1.0 0.0
2019-11-08 0.0 0.0 -1.0
2019-12-13 1.0 1.0 0.0
2019-12-16 1.0 0.0 1.0
2020-01-27 0.0 -1.0 0.0
2020-01-28 0.0 0.0 -1.0
2020-04-30 1.0 1.0 0.0
2020-05-01 1.0 0.0 1.0
2020-05-06 0.0 -1.0 0.0
2020-05-07 0.0 0.0 -1.0
2020-05-08 1.0 1.0 0.0
2020-05-11 0.0 -1.0 1.0
2020-05-12 0.0 0.0 -1.0
2020-05-18 1.0 1.0 0.0
2020-05-19 1.0 0.0 1.0
2020-06-30 0.0 -1.0 0.0
List the signal change and entry/exit points for EMA_013_SlowMA_30_FastMA_15
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-29 1816.62 1808.80 1751.628009 1747.954402 3.673607
2019-01-30 1825.33 1818.70 1760.012739 1752.561886 7.450854
2019-03-05 1715.00 1745.93 1821.170962 1826.042367 -4.871405
2019-03-06 1748.37 1751.62 1812.477061 1821.231812 -8.754751
2019-04-11 1810.00 1818.59 1779.604508 1778.477305 1.127203
2019-04-12 1827.87 1833.07 1786.287695 1782.000517 4.287179
2019-05-09 1729.43 1736.03 1806.580834 1809.043896 -2.463062
2019-05-10 1825.00 1829.85 1809.489480 1810.386344 -0.896864
2019-06-18 1808.38 1808.99 1772.022962 1769.484609 2.538354
2019-06-19 1812.00 1842.06 1780.777592 1774.166960 6.610632
2019-08-07 1758.40 1821.56 1862.137153 1863.528670 -1.391517
2019-08-08 1900.00 1941.01 1871.996259 1868.527473 3.468787
2019-08-09 1926.54 1917.69 1877.707977 1871.699253 6.008724
2019-10-09 1953.72 1943.33 1971.014955 1972.431932 -1.416977
2019-10-10 1942.69 1962.91 1970.001835 1971.817614 -1.815779
2019-10-15 1992.21 2016.39 1978.537909 1976.017946 2.519963
2019-10-16 2016.80 2027.63 1984.674421 1979.347756 5.326664
2019-11-08 1941.00 1879.19 1987.449702 1994.424318 -6.974616
2019-11-11 1869.00 1896.04 1976.023489 1988.076942 -12.053453
2019-12-16 1983.47 1995.02 1928.309284 1927.247673 1.061611
2019-12-17 2000.00 2001.87 1937.504373 1932.062017 5.442357
2020-01-28 1914.67 1917.45 2000.083660 2005.635451 -5.551791
2020-01-29 1924.04 1893.95 1986.816952 1998.429938 -11.612986
2020-05-18 1430.00 1557.43 1420.555695 1420.500514 0.055181
2020-05-19 1556.29 1547.56 1436.431233 1428.697900 7.733333
trade_signal signal_change entry_exit
date
2019-01-29 1.0 1.0 0.0
2019-01-30 1.0 0.0 1.0
2019-03-05 0.0 -1.0 0.0
2019-03-06 0.0 0.0 -1.0
2019-04-11 1.0 1.0 0.0
2019-04-12 1.0 0.0 1.0
2019-05-09 0.0 -1.0 0.0
2019-05-10 0.0 0.0 -1.0
2019-06-18 1.0 1.0 0.0
2019-06-19 1.0 0.0 1.0
2019-08-07 0.0 -1.0 0.0
2019-08-08 1.0 1.0 -1.0
2019-08-09 1.0 0.0 1.0
2019-10-09 0.0 -1.0 0.0
2019-10-10 0.0 0.0 -1.0
2019-10-15 1.0 1.0 0.0
2019-10-16 1.0 0.0 1.0
2019-11-08 0.0 -1.0 0.0
2019-11-11 0.0 0.0 -1.0
2019-12-16 1.0 1.0 0.0
2019-12-17 1.0 0.0 1.0
2020-01-28 0.0 -1.0 0.0
2020-01-29 0.0 0.0 -1.0
2020-05-18 1.0 1.0 0.0
2020-05-19 1.0 0.0 1.0
List the signal change and entry/exit points for EMA_014_SlowMA_30_FastMA_20
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-30 1825.33 1818.70 1753.532129 1752.561886 0.970243
2019-01-31 1820.37 1832.81 1761.088600 1757.785052 3.303548
2019-03-06 1748.37 1751.62 1819.944657 1821.231812 -1.287154
2019-03-07 1746.50 1725.01 1810.902590 1815.012933 -4.110343
2019-04-12 1827.87 1833.07 1782.827844 1782.000517 0.827328
2019-04-15 1834.00 1846.23 1788.866175 1786.145567 2.720607
2019-05-13 1800.00 1777.26 1808.104306 1808.248984 -0.144678
2019-05-14 1787.12 1793.67 1806.729609 1807.308332 -0.578723
2019-06-19 1812.00 1842.06 1776.027277 1774.166960 1.860317
2019-06-20 1862.07 1861.31 1784.149442 1779.789168 4.360273
2019-11-08 1941.00 1879.19 1992.804776 1994.424318 -1.619541
2019-11-11 1869.00 1896.04 1983.589083 1988.076942 -4.487859
2019-12-17 2000.00 2001.87 1932.517811 1932.062017 0.455794
2019-12-18 2008.67 1991.51 1938.136115 1935.897370 2.238744
2020-01-29 1924.04 1893.95 1995.204172 1998.429938 -3.225766
2020-01-30 1871.42 1872.09 1983.479013 1990.278974 -6.799961
2020-05-19 1556.29 1547.56 1429.518487 1428.697900 0.820586
2020-05-20 1578.52 1599.15 1445.673869 1439.694810 5.979059
trade_signal signal_change entry_exit
date
2019-01-30 1.0 1.0 0.0
2019-01-31 1.0 0.0 1.0
2019-03-06 0.0 -1.0 0.0
2019-03-07 0.0 0.0 -1.0
2019-04-12 1.0 1.0 0.0
2019-04-15 1.0 0.0 1.0
2019-05-13 0.0 -1.0 0.0
2019-05-14 0.0 0.0 -1.0
2019-06-19 1.0 1.0 0.0
2019-06-20 1.0 0.0 1.0
2019-11-08 0.0 -1.0 0.0
2019-11-11 0.0 0.0 -1.0
2019-12-17 1.0 1.0 0.0
2019-12-18 1.0 0.0 1.0
2020-01-29 0.0 -1.0 0.0
2020-01-30 0.0 0.0 -1.0
2020-05-19 1.0 1.0 0.0
2020-05-20 1.0 0.0 1.0
List the signal change and entry/exit points for EMA_015_SlowMA_35_FastMA_05
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-24 1748.98 1795.67 1748.658638 1739.480709 9.177929
2019-01-25 1811.99 1802.20 1766.505759 1743.042469 23.463290
2019-02-28 1754.00 1697.04 1837.781139 1842.842534 -5.061395
2019-03-01 1708.20 1714.08 1796.547426 1835.649435 -39.102009
2019-04-08 1767.92 1788.72 1775.174211 1774.513352 0.660860
2019-04-09 1776.75 1794.47 1781.606141 1775.623361 5.982780
2019-05-07 1781.45 1785.00 1809.790374 1815.982619 -6.192245
2019-05-08 1765.01 1751.63 1790.403583 1812.406132 -22.002549
2019-06-11 1799.50 1803.63 1773.487703 1762.741717 10.745986
2019-06-12 1804.17 1798.90 1781.958468 1764.750702 17.207767
2019-08-05 1819.98 1788.60 1850.994684 1867.496927 -16.502243
2019-08-06 1799.20 1786.52 1829.503123 1862.998160 -33.495037
2019-08-09 1926.54 1917.69 1882.501296 1868.076422 14.424874
2019-08-12 1900.44 1916.89 1893.964197 1870.788310 23.175887
2019-09-30 1953.00 1962.61 1975.433757 1975.829956 -0.396199
2019-10-01 1977.00 1978.03 1976.299171 1975.952181 0.346990
2019-10-02 1969.00 1941.44 1964.679447 1974.034835 -9.355388
2019-10-03 1936.55 1961.45 1963.602965 1973.335677 -9.732712
2019-10-14 1964.52 1988.75 1971.269067 1970.399197 0.869870
2019-10-15 1992.21 2016.39 1986.309378 1972.954243 13.355135
2019-11-07 1942.20 1849.93 1965.462045 1999.728994 -34.266948
2019-11-08 1941.00 1879.19 1936.704697 1993.032381 -56.327684
2019-12-12 1930.85 1948.48 1925.228192 1922.733814 2.494378
2019-12-13 1960.87 1973.60 1941.352128 1925.559713 15.792414
2020-01-23 1986.24 1993.20 2014.841566 2017.536877 -2.695311
2020-01-24 1998.00 1962.96 1997.547711 2014.504828 -16.957117
2020-02-18 1972.25 1976.28 1961.652479 1959.124322 2.528156
2020-02-19 1982.76 1968.49 1963.931653 1959.644638 4.287015
2020-02-21 1965.00 1928.72 1953.745179 1958.517686 -4.772507
2020-02-24 1830.93 1792.54 1900.010119 1949.296704 -49.286584
2020-04-29 1487.83 1520.53 1440.810020 1433.477255 7.332765
2020-04-30 1514.53 1480.57 1454.063347 1436.093518 17.969828
2020-05-05 1443.25 1393.20 1423.935806 1433.143753 -9.207946
2020-05-06 1397.46 1378.91 1408.927204 1430.130766 -21.203562
2020-05-18 1430.00 1557.43 1444.710732 1427.228706 17.482027
2020-05-19 1556.29 1547.56 1478.993822 1433.913778 45.080044
2020-06-26 1597.30 1541.25 1600.674407 1609.345305 -8.670898
2020-06-29 1567.77 1593.22 1598.189605 1608.449455 -10.259850
trade_signal signal_change entry_exit
date
2019-01-24 1.0 1.0 0.0
2019-01-25 1.0 0.0 1.0
2019-02-28 0.0 -1.0 0.0
2019-03-01 0.0 0.0 -1.0
2019-04-08 1.0 1.0 0.0
2019-04-09 1.0 0.0 1.0
2019-05-07 0.0 -1.0 0.0
2019-05-08 0.0 0.0 -1.0
2019-06-11 1.0 1.0 0.0
2019-06-12 1.0 0.0 1.0
2019-08-05 0.0 -1.0 0.0
2019-08-06 0.0 0.0 -1.0
2019-08-09 1.0 1.0 0.0
2019-08-12 1.0 0.0 1.0
2019-09-30 0.0 -1.0 0.0
2019-10-01 1.0 1.0 -1.0
2019-10-02 0.0 -1.0 1.0
2019-10-03 0.0 0.0 -1.0
2019-10-14 1.0 1.0 0.0
2019-10-15 1.0 0.0 1.0
2019-11-07 0.0 -1.0 0.0
2019-11-08 0.0 0.0 -1.0
2019-12-12 1.0 1.0 0.0
2019-12-13 1.0 0.0 1.0
2020-01-23 0.0 -1.0 0.0
2020-01-24 0.0 0.0 -1.0
2020-02-18 1.0 1.0 0.0
2020-02-19 1.0 0.0 1.0
2020-02-21 0.0 -1.0 0.0
2020-02-24 0.0 0.0 -1.0
2020-04-29 1.0 1.0 0.0
2020-04-30 1.0 0.0 1.0
2020-05-05 0.0 -1.0 0.0
2020-05-06 0.0 0.0 -1.0
2020-05-18 1.0 1.0 0.0
2020-05-19 1.0 0.0 1.0
2020-06-26 0.0 -1.0 0.0
2020-06-29 0.0 0.0 -1.0
List the signal change and entry/exit points for EMA_016_SlowMA_35_FastMA_10
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-28 1787.62 1813.60 1755.321450 1747.044417 8.277033
2019-01-29 1816.62 1808.80 1765.044832 1750.543058 14.501774
2019-03-04 1723.66 1707.82 1815.097510 1828.510659 -13.413148
2019-03-05 1715.00 1745.93 1802.521599 1823.900190 -21.378591
2019-04-10 1793.85 1806.00 1778.734513 1777.312830 1.421682
2019-04-11 1810.00 1818.59 1785.980965 1779.608417 6.372548
2019-05-08 1765.01 1751.63 1810.603370 1812.406132 -1.802761
2019-05-09 1729.43 1736.03 1797.044576 1808.161509 -11.116933
2019-06-13 1802.05 1809.52 1770.830991 1767.238108 3.592883
2019-06-14 1808.20 1775.50 1771.679902 1767.697141 3.982760
2019-08-06 1799.20 1786.52 1857.919655 1862.998160 -5.078505
2019-08-07 1758.40 1821.56 1851.308809 1860.696016 -9.387208
2019-08-08 1900.00 1941.01 1867.618116 1865.157947 2.460169
2019-08-09 1926.54 1917.69 1876.722095 1868.076422 8.645674
2019-10-08 1937.05 1938.19 1967.332285 1970.729405 -3.397119
2019-10-09 1953.72 1943.33 1962.968234 1969.207214 -6.238981
2019-10-15 1992.21 2016.39 1978.240544 1972.954243 5.286300
2019-10-16 2016.80 2027.63 1987.220445 1975.991787 11.228657
2019-11-07 1942.20 1849.93 1994.876742 1999.728994 -4.852252
2019-11-08 1941.00 1879.19 1973.842789 1993.032381 -19.189593
2019-12-16 1983.47 1995.02 1937.990317 1929.418618 8.571699
2019-12-17 2000.00 2001.87 1949.604805 1933.443695 16.161110
2020-01-27 1906.41 1908.89 1999.350830 2008.637338 -9.286508
2020-01-28 1914.67 1917.45 1984.459770 2003.571374 -19.111604
2020-05-19 1556.29 1547.56 1448.786484 1433.913778 14.872706
2020-05-20 1578.52 1599.15 1476.125305 1443.093568 33.031737
trade_signal signal_change entry_exit
date
2019-01-28 1.0 1.0 0.0
2019-01-29 1.0 0.0 1.0
2019-03-04 0.0 -1.0 0.0
2019-03-05 0.0 0.0 -1.0
2019-04-10 1.0 1.0 0.0
2019-04-11 1.0 0.0 1.0
2019-05-08 0.0 -1.0 0.0
2019-05-09 0.0 0.0 -1.0
2019-06-13 1.0 1.0 0.0
2019-06-14 1.0 0.0 1.0
2019-08-06 0.0 -1.0 0.0
2019-08-07 0.0 0.0 -1.0
2019-08-08 1.0 1.0 0.0
2019-08-09 1.0 0.0 1.0
2019-10-08 0.0 -1.0 0.0
2019-10-09 0.0 0.0 -1.0
2019-10-15 1.0 1.0 0.0
2019-10-16 1.0 0.0 1.0
2019-11-07 0.0 -1.0 0.0
2019-11-08 0.0 0.0 -1.0
2019-12-16 1.0 1.0 0.0
2019-12-17 1.0 0.0 1.0
2020-01-27 0.0 -1.0 0.0
2020-01-28 0.0 0.0 -1.0
2020-05-19 1.0 1.0 0.0
2020-05-20 1.0 0.0 1.0
List the signal change and entry/exit points for EMA_017_SlowMA_35_FastMA_15
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-29 1816.62 1808.80 1751.628009 1750.543058 1.084951
2019-01-30 1825.33 1818.70 1760.012739 1754.400123 5.612616
2019-03-05 1715.00 1745.93 1821.170962 1823.900190 -2.729228
2019-03-06 1748.37 1751.62 1812.477061 1819.865902 -7.388841
2019-04-12 1827.87 1833.07 1786.287695 1782.581453 3.706243
2019-04-15 1834.00 1846.23 1793.780484 1786.120798 7.659686
2019-05-09 1729.43 1736.03 1806.580834 1808.161509 -1.580674
2019-05-10 1825.00 1829.85 1809.489480 1809.366828 0.122652
2019-05-13 1800.00 1777.26 1805.460795 1807.582552 -2.121757
2019-05-14 1787.12 1793.67 1803.986946 1806.809401 -2.822456
2019-06-18 1808.38 1808.99 1772.022962 1770.710919 1.312043
2019-06-19 1812.00 1842.06 1780.777592 1774.675041 6.102551
2019-11-08 1941.00 1879.19 1987.449702 1993.032381 -5.582680
2019-11-11 1869.00 1896.04 1976.023489 1987.643914 -11.620426
2019-12-17 2000.00 2001.87 1937.504373 1933.443695 4.060678
2019-12-18 2008.67 1991.51 1944.255077 1936.669601 7.585475
2020-01-28 1914.67 1917.45 2000.083660 2003.571374 -3.487715
2020-01-29 1924.04 1893.95 1986.816952 1997.481298 -10.664346
2020-05-19 1556.29 1547.56 1436.431233 1433.913778 2.517455
2020-05-20 1578.52 1599.15 1456.771079 1443.093568 13.677511
trade_signal signal_change entry_exit
date
2019-01-29 1.0 1.0 0.0
2019-01-30 1.0 0.0 1.0
2019-03-05 0.0 -1.0 0.0
2019-03-06 0.0 0.0 -1.0
2019-04-12 1.0 1.0 0.0
2019-04-15 1.0 0.0 1.0
2019-05-09 0.0 -1.0 0.0
2019-05-10 1.0 1.0 -1.0
2019-05-13 0.0 -1.0 1.0
2019-05-14 0.0 0.0 -1.0
2019-06-18 1.0 1.0 0.0
2019-06-19 1.0 0.0 1.0
2019-11-08 0.0 -1.0 0.0
2019-11-11 0.0 0.0 -1.0
2019-12-17 1.0 1.0 0.0
2019-12-18 1.0 0.0 1.0
2020-01-28 0.0 -1.0 0.0
2020-01-29 0.0 0.0 -1.0
2020-05-19 1.0 1.0 0.0
2020-05-20 1.0 0.0 1.0
List the signal change and entry/exit points for EMA_018_SlowMA_35_FastMA_20
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-31 1820.37 1832.81 1761.088600 1758.832821 2.255779
2019-02-01 1824.05 1836.96 1768.319814 1763.245227 5.074587
2019-03-07 1746.50 1725.01 1810.902590 1814.572931 -3.670341
2019-03-08 1708.04 1715.82 1801.846497 1809.063853 -7.217356
2019-04-12 1827.87 1833.07 1782.827844 1782.581453 0.246391
2019-04-15 1834.00 1846.23 1788.866175 1786.120798 2.745377
2019-05-14 1787.12 1793.67 1806.729609 1806.809401 -0.079792
2019-05-15 1778.60 1789.43 1805.082026 1805.843607 -0.761580
2019-06-19 1812.00 1842.06 1776.027277 1774.675041 1.352237
2019-06-20 1862.07 1861.31 1784.149442 1779.488419 4.661023
2019-11-08 1941.00 1879.19 1992.804776 1993.032381 -0.227605
2019-11-11 1869.00 1896.04 1983.589083 1987.643914 -4.054831
2019-12-18 2008.67 1991.51 1938.136115 1936.669601 1.466513
2019-12-19 1996.00 2003.12 1944.325056 1940.361290 3.963766
2020-01-29 1924.04 1893.95 1995.204172 1997.481298 -2.277126
2020-01-30 1871.42 1872.09 1983.479013 1990.515115 -7.036102
2020-05-20 1578.52 1599.15 1445.673869 1443.093568 2.580301
2020-05-21 1605.00 1595.68 1459.960167 1451.570592 8.389575
trade_signal signal_change entry_exit
date
2019-01-31 1.0 1.0 0.0
2019-02-01 1.0 0.0 1.0
2019-03-07 0.0 -1.0 0.0
2019-03-08 0.0 0.0 -1.0
2019-04-12 1.0 1.0 0.0
2019-04-15 1.0 0.0 1.0
2019-05-14 0.0 -1.0 0.0
2019-05-15 0.0 0.0 -1.0
2019-06-19 1.0 1.0 0.0
2019-06-20 1.0 0.0 1.0
2019-11-08 0.0 -1.0 0.0
2019-11-11 0.0 0.0 -1.0
2019-12-18 1.0 1.0 0.0
2019-12-19 1.0 0.0 1.0
2020-01-29 0.0 -1.0 0.0
2020-01-30 0.0 0.0 -1.0
2020-05-20 1.0 1.0 0.0
2020-05-21 1.0 0.0 1.0
List the signal change and entry/exit points for EMA_019_SlowMA_40_FastMA_05
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-24 1748.98 1795.67 1748.658638 1744.139996 4.518642
2019-01-25 1811.99 1802.20 1766.505759 1747.075096 19.430663
2019-02-28 1754.00 1697.04 1837.781139 1837.938396 -0.157257
2019-03-01 1708.20 1714.08 1796.547426 1831.832057 -35.284631
2019-04-09 1776.75 1794.47 1781.606141 1777.407581 4.198560
2019-04-10 1793.85 1806.00 1789.737427 1778.805973 10.931454
2019-05-07 1781.45 1785.00 1809.790374 1813.959035 -4.168661
2019-05-08 1765.01 1751.63 1790.403583 1810.915532 -20.511949
2019-06-11 1799.50 1803.63 1773.487703 1765.607352 7.880351
2019-06-12 1804.17 1798.90 1781.958468 1767.231876 14.726592
2019-08-05 1819.98 1788.60 1850.994684 1863.155407 -12.160723
2019-08-06 1799.20 1786.52 1829.503123 1859.416925 -29.913803
2019-08-08 1900.00 1941.01 1864.906943 1861.640569 3.266374
2019-08-09 1926.54 1917.69 1882.501296 1864.374794 18.126501
2019-10-02 1969.00 1941.44 1964.679447 1968.246309 -3.566861
2019-10-03 1936.55 1961.45 1963.602965 1967.914779 -4.311814
2019-10-04 1970.64 1983.20 1970.135310 1968.660404 1.474906
2019-10-07 1971.01 1951.56 1963.943540 1967.826234 -3.882694
2019-10-08 1937.05 1938.19 1955.359027 1966.380556 -11.021530
2019-10-14 1964.52 1988.75 1971.269067 1966.851909 4.417158
2019-10-15 1992.21 2016.39 1986.309378 1969.268410 17.040968
2019-11-07 1942.20 1849.93 1965.462045 1996.525498 -31.063453
2019-11-08 1941.00 1879.19 1936.704697 1990.801806 -54.097110
2019-12-13 1960.87 1973.60 1941.352128 1928.237102 13.115026
2019-12-16 1983.47 1995.02 1959.241419 1931.494806 27.746613
2020-01-24 1998.00 1962.96 1997.547711 2010.450505 -12.902794
2020-01-27 1906.41 1908.89 1967.995140 2005.496334 -37.501193
2020-02-18 1972.25 1976.28 1961.652479 1961.194502 0.457977
2020-02-19 1982.76 1968.49 1963.931653 1961.550380 2.381273
2020-02-21 1965.00 1928.72 1953.745179 1960.383193 -6.638014
2020-02-24 1830.93 1792.54 1900.010119 1952.195720 -52.185601
2020-04-30 1514.53 1480.57 1454.063347 1451.616652 2.446694
2020-05-01 1442.75 1448.79 1452.305564 1451.478767 0.826798
2020-05-04 1415.73 1413.30 1439.303710 1449.616388 -10.312678
2020-05-05 1443.25 1393.20 1423.935806 1446.864369 -22.928562
2020-05-18 1430.00 1557.43 1444.710732 1436.423581 8.287151
2020-05-19 1556.29 1547.56 1478.993822 1441.844870 37.148952
2020-06-26 1597.30 1541.25 1600.674407 1602.432681 -1.758273
2020-06-29 1567.77 1593.22 1598.189605 1601.983282 -3.793677
trade_signal signal_change entry_exit
date
2019-01-24 1.0 1.0 0.0
2019-01-25 1.0 0.0 1.0
2019-02-28 0.0 -1.0 0.0
2019-03-01 0.0 0.0 -1.0
2019-04-09 1.0 1.0 0.0
2019-04-10 1.0 0.0 1.0
2019-05-07 0.0 -1.0 0.0
2019-05-08 0.0 0.0 -1.0
2019-06-11 1.0 1.0 0.0
2019-06-12 1.0 0.0 1.0
2019-08-05 0.0 -1.0 0.0
2019-08-06 0.0 0.0 -1.0
2019-08-08 1.0 1.0 0.0
2019-08-09 1.0 0.0 1.0
2019-10-02 0.0 -1.0 0.0
2019-10-03 0.0 0.0 -1.0
2019-10-04 1.0 1.0 0.0
2019-10-07 0.0 -1.0 1.0
2019-10-08 0.0 0.0 -1.0
2019-10-14 1.0 1.0 0.0
2019-10-15 1.0 0.0 1.0
2019-11-07 0.0 -1.0 0.0
2019-11-08 0.0 0.0 -1.0
2019-12-13 1.0 1.0 0.0
2019-12-16 1.0 0.0 1.0
2020-01-24 0.0 -1.0 0.0
2020-01-27 0.0 0.0 -1.0
2020-02-18 1.0 1.0 0.0
2020-02-19 1.0 0.0 1.0
2020-02-21 0.0 -1.0 0.0
2020-02-24 0.0 0.0 -1.0
2020-04-30 1.0 1.0 0.0
2020-05-01 1.0 0.0 1.0
2020-05-04 0.0 -1.0 0.0
2020-05-05 0.0 0.0 -1.0
2020-05-18 1.0 1.0 0.0
2020-05-19 1.0 0.0 1.0
2020-06-26 0.0 -1.0 0.0
2020-06-29 0.0 0.0 -1.0
List the signal change and entry/exit points for EMA_020_SlowMA_40_FastMA_10
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-28 1787.62 1813.60 1755.321450 1750.432170 4.889280
2019-01-29 1816.62 1808.80 1765.044832 1753.372662 11.672170
2019-03-04 1723.66 1707.82 1815.097510 1825.721324 -10.623813
2019-03-05 1715.00 1745.93 1802.521599 1821.791525 -19.269926
2019-04-11 1810.00 1818.59 1785.980965 1780.751474 5.229491
2019-04-12 1827.87 1833.07 1794.542608 1783.309621 11.232987
2019-05-08 1765.01 1751.63 1810.603370 1810.915532 -0.312162
2019-05-09 1729.43 1736.03 1797.044576 1807.259079 -10.214503
2019-06-13 1802.05 1809.52 1770.830991 1769.295306 1.535685
2019-06-14 1808.20 1775.50 1771.679902 1769.598057 2.081845
2019-08-06 1799.20 1786.52 1857.919655 1859.416925 -1.497270
2019-08-07 1758.40 1821.56 1851.308809 1857.570166 -6.261358
2019-08-08 1900.00 1941.01 1867.618116 1861.640569 5.977547
2019-08-09 1926.54 1917.69 1876.722095 1864.374794 12.347301
2019-10-09 1953.72 1943.33 1962.968234 1965.256134 -2.287900
2019-10-10 1942.69 1962.91 1962.957646 1965.141688 -2.184042
2019-10-14 1964.52 1988.75 1969.762887 1966.851909 2.910978
2019-10-15 1992.21 2016.39 1978.240544 1969.268410 8.972133
2019-11-07 1942.20 1849.93 1994.876742 1996.525498 -1.648757
2019-11-08 1941.00 1879.19 1973.842789 1990.801806 -16.959018
2019-12-16 1983.47 1995.02 1937.990317 1931.494806 6.495512
2019-12-17 2000.00 2001.87 1949.604805 1934.927743 14.677062
2020-01-27 1906.41 1908.89 1999.350830 2005.496334 -6.145503
2020-01-28 1914.67 1917.45 1984.459770 2001.201390 -16.741620
2020-05-19 1556.29 1547.56 1448.786484 1441.844870 6.941614
2020-05-20 1578.52 1599.15 1476.125305 1449.518291 26.607014
trade_signal signal_change entry_exit
date
2019-01-28 1.0 1.0 0.0
2019-01-29 1.0 0.0 1.0
2019-03-04 0.0 -1.0 0.0
2019-03-05 0.0 0.0 -1.0
2019-04-11 1.0 1.0 0.0
2019-04-12 1.0 0.0 1.0
2019-05-08 0.0 -1.0 0.0
2019-05-09 0.0 0.0 -1.0
2019-06-13 1.0 1.0 0.0
2019-06-14 1.0 0.0 1.0
2019-08-06 0.0 -1.0 0.0
2019-08-07 0.0 0.0 -1.0
2019-08-08 1.0 1.0 0.0
2019-08-09 1.0 0.0 1.0
2019-10-09 0.0 -1.0 0.0
2019-10-10 0.0 0.0 -1.0
2019-10-14 1.0 1.0 0.0
2019-10-15 1.0 0.0 1.0
2019-11-07 0.0 -1.0 0.0
2019-11-08 0.0 0.0 -1.0
2019-12-16 1.0 1.0 0.0
2019-12-17 1.0 0.0 1.0
2020-01-27 0.0 -1.0 0.0
2020-01-28 0.0 0.0 -1.0
2020-05-19 1.0 1.0 0.0
2020-05-20 1.0 0.0 1.0
List the signal change and entry/exit points for EMA_021_SlowMA_40_FastMA_15
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-30 1825.33 1818.70 1760.012739 1756.658513 3.354226
2019-01-31 1820.37 1832.81 1769.113091 1760.482996 8.630096
2019-03-05 1715.00 1745.93 1821.170962 1821.791525 -0.620563
2019-03-06 1748.37 1751.62 1812.477061 1818.337136 -5.860075
2019-04-12 1827.87 1833.07 1786.287695 1783.309621 2.978074
2019-04-15 1834.00 1846.23 1793.780484 1786.385799 7.394685
2019-05-09 1729.43 1736.03 1806.580834 1807.259079 -0.678245
2019-05-10 1825.00 1829.85 1809.489480 1808.362079 1.127401
2019-05-13 1800.00 1777.26 1805.460795 1806.843590 -1.382795
2019-05-14 1787.12 1793.67 1803.986946 1806.200446 -2.213500
2019-06-19 1812.00 1842.06 1780.777592 1775.483348 5.294244
2019-06-20 1862.07 1861.31 1790.844143 1779.670954 11.173189
2019-11-08 1941.00 1879.19 1987.449702 1990.801806 -3.352105
2019-11-11 1869.00 1896.04 1976.023489 1986.179272 -10.155783
2019-12-17 2000.00 2001.87 1937.504373 1934.927743 2.576630
2019-12-18 2008.67 1991.51 1944.255077 1937.687855 6.567222
2020-01-28 1914.67 1917.45 2000.083660 2001.201390 -1.117731
2020-01-29 1924.04 1893.95 1986.816952 1995.969614 -9.152662
2020-05-20 1578.52 1599.15 1456.771079 1449.518291 7.252788
2020-05-21 1605.00 1595.68 1474.134694 1456.648130 17.486564
trade_signal signal_change entry_exit
date
2019-01-30 1.0 1.0 0.0
2019-01-31 1.0 0.0 1.0
2019-03-05 0.0 -1.0 0.0
2019-03-06 0.0 0.0 -1.0
2019-04-12 1.0 1.0 0.0
2019-04-15 1.0 0.0 1.0
2019-05-09 0.0 -1.0 0.0
2019-05-10 1.0 1.0 -1.0
2019-05-13 0.0 -1.0 1.0
2019-05-14 0.0 0.0 -1.0
2019-06-19 1.0 1.0 0.0
2019-06-20 1.0 0.0 1.0
2019-11-08 0.0 -1.0 0.0
2019-11-11 0.0 0.0 -1.0
2019-12-17 1.0 1.0 0.0
2019-12-18 1.0 0.0 1.0
2020-01-28 0.0 -1.0 0.0
2020-01-29 0.0 0.0 -1.0
2020-05-20 1.0 1.0 0.0
2020-05-21 1.0 0.0 1.0
List the signal change and entry/exit points for EMA_022_SlowMA_40_FastMA_20
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-31 1820.37 1832.81 1761.088600 1760.482996 0.605605
2019-02-01 1824.05 1836.96 1768.319814 1764.318297 4.001517
2019-03-07 1746.50 1725.01 1810.902590 1813.744901 -2.842311
2019-03-08 1708.04 1715.82 1801.846497 1808.928479 -7.081982
2019-04-15 1834.00 1846.23 1788.866175 1786.385799 2.480376
2019-04-16 1851.80 1841.70 1793.897990 1789.089814 4.808177
2019-05-15 1778.60 1789.43 1805.082026 1805.381733 -0.299707
2019-05-16 1790.00 1803.31 1804.913262 1805.280598 -0.367336
2019-06-19 1812.00 1842.06 1776.027277 1775.483348 0.543929
2019-06-20 1862.07 1861.31 1784.149442 1779.670954 4.478488
2019-11-11 1869.00 1896.04 1983.589083 1986.179272 -2.590189
2019-11-12 1901.35 1875.84 1973.327266 1980.796861 -7.469595
2019-12-18 2008.67 1991.51 1938.136115 1937.687855 0.448260
2019-12-19 1996.00 2003.12 1944.325056 1940.879668 3.445388
2020-01-29 1924.04 1893.95 1995.204172 1995.969614 -0.765442
2020-01-30 1871.42 1872.09 1983.479013 1989.926706 -6.447693
2020-05-21 1605.00 1595.68 1459.960167 1456.648130 3.312037
2020-05-22 1591.74 1631.30 1476.278246 1465.167734 11.110513
trade_signal signal_change entry_exit
date
2019-01-31 1.0 1.0 0.0
2019-02-01 1.0 0.0 1.0
2019-03-07 0.0 -1.0 0.0
2019-03-08 0.0 0.0 -1.0
2019-04-15 1.0 1.0 0.0
2019-04-16 1.0 0.0 1.0
2019-05-15 0.0 -1.0 0.0
2019-05-16 0.0 0.0 -1.0
2019-06-19 1.0 1.0 0.0
2019-06-20 1.0 0.0 1.0
2019-11-11 0.0 -1.0 0.0
2019-11-12 0.0 0.0 -1.0
2019-12-18 1.0 1.0 0.0
2019-12-19 1.0 0.0 1.0
2020-01-29 0.0 -1.0 0.0
2020-01-30 0.0 0.0 -1.0
2020-05-21 1.0 1.0 0.0
2020-05-22 1.0 0.0 1.0
List the signal change and entry/exit points for EMA_023_SlowMA_45_FastMA_05
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-24 1748.98 1795.67 1748.658638 1748.292451 0.366188
2019-01-25 1811.99 1802.20 1766.505759 1750.761905 15.743854
2019-03-01 1708.20 1714.08 1796.547426 1828.690382 -32.142956
2019-03-04 1723.66 1707.82 1766.971617 1823.345642 -56.374025
2019-04-09 1776.75 1794.47 1781.606141 1778.964523 2.641618
2019-04-10 1793.85 1806.00 1789.737427 1780.145936 9.591491
2019-05-07 1781.45 1785.00 1809.790374 1812.274086 -2.483712
2019-05-08 1765.01 1751.63 1790.403583 1809.631660 -19.228077
2019-06-11 1799.50 1803.63 1773.487703 1768.085314 5.402388
2019-06-12 1804.17 1798.90 1781.958468 1769.426083 12.532385
2019-08-05 1819.98 1788.60 1850.994684 1859.075024 -8.080340
2019-08-06 1799.20 1786.52 1829.503123 1855.920023 -26.416900
2019-08-08 1900.00 1941.01 1864.906943 1858.190912 6.716031
2019-08-09 1926.54 1917.69 1882.501296 1860.778141 21.723155
2019-10-08 1937.05 1938.19 1955.359027 1961.701286 -6.342260
2019-10-09 1953.72 1943.33 1951.349351 1960.902520 -9.553169
2019-10-11 1984.30 1977.18 1962.528600 1961.693737 0.834864
2019-10-14 1964.52 1988.75 1971.269067 1962.870115 8.398952
2019-11-07 1942.20 1849.93 1965.462045 1992.931750 -27.469705
2019-11-08 1941.00 1879.19 1936.704697 1987.986422 -51.281725
2019-12-13 1960.87 1973.60 1941.352128 1930.424673 10.927455
2019-12-16 1983.47 1995.02 1959.241419 1933.233172 26.008246
2020-01-24 1998.00 1962.96 1997.547711 2006.707164 -9.159453
2020-01-27 1906.41 1908.89 1967.995140 2002.454241 -34.459100
2020-02-19 1982.76 1968.49 1963.931653 1962.921293 1.010360
2020-02-20 1960.00 1970.91 1966.257768 1963.268628 2.989141
2020-02-21 1965.00 1928.72 1953.745179 1961.766513 -8.021334
2020-02-24 1830.93 1792.54 1900.010119 1954.408836 -54.398717
2020-05-19 1556.29 1547.56 1478.993822 1451.705605 27.288216
2020-05-20 1578.52 1599.15 1519.045881 1458.116231 60.929650
2020-06-30 1583.90 1592.34 1596.239737 1596.772300 -0.532563
trade_signal signal_change entry_exit
date
2019-01-24 1.0 1.0 0.0
2019-01-25 1.0 0.0 1.0
2019-03-01 0.0 -1.0 0.0
2019-03-04 0.0 0.0 -1.0
2019-04-09 1.0 1.0 0.0
2019-04-10 1.0 0.0 1.0
2019-05-07 0.0 -1.0 0.0
2019-05-08 0.0 0.0 -1.0
2019-06-11 1.0 1.0 0.0
2019-06-12 1.0 0.0 1.0
2019-08-05 0.0 -1.0 0.0
2019-08-06 0.0 0.0 -1.0
2019-08-08 1.0 1.0 0.0
2019-08-09 1.0 0.0 1.0
2019-10-08 0.0 -1.0 0.0
2019-10-09 0.0 0.0 -1.0
2019-10-11 1.0 1.0 0.0
2019-10-14 1.0 0.0 1.0
2019-11-07 0.0 -1.0 0.0
2019-11-08 0.0 0.0 -1.0
2019-12-13 1.0 1.0 0.0
2019-12-16 1.0 0.0 1.0
2020-01-24 0.0 -1.0 0.0
2020-01-27 0.0 0.0 -1.0
2020-02-19 1.0 1.0 0.0
2020-02-20 1.0 0.0 1.0
2020-02-21 0.0 -1.0 0.0
2020-02-24 0.0 0.0 -1.0
2020-05-19 1.0 1.0 0.0
2020-05-20 1.0 0.0 1.0
2020-06-30 0.0 -1.0 0.0
List the signal change and entry/exit points for EMA_024_SlowMA_45_FastMA_10
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-28 1787.62 1813.60 1755.321450 1753.633766 1.687684
2019-01-29 1816.62 1808.80 1765.044832 1756.149408 8.895425
2019-03-04 1723.66 1707.82 1815.097510 1823.345642 -8.248132
2019-03-05 1715.00 1745.93 1802.521599 1819.924951 -17.403351
2019-04-11 1810.00 1818.59 1785.980965 1781.825519 4.155446
2019-04-12 1827.87 1833.07 1794.542608 1784.063868 10.478740
2019-05-09 1729.43 1736.03 1797.044576 1806.424941 -9.380365
2019-05-10 1825.00 1829.85 1803.009198 1807.445445 -4.436247
2019-06-14 1808.20 1775.50 1771.679902 1771.358907 0.320995
2019-06-17 1776.00 1781.41 1773.449011 1771.796196 1.652814
2019-08-07 1758.40 1821.56 1851.308809 1854.425912 -3.117103
2019-08-08 1900.00 1941.01 1867.618116 1858.190912 9.427204
2019-08-09 1926.54 1917.69 1876.722095 1860.778141 15.943954
2019-11-08 1941.00 1879.19 1973.842789 1987.986422 -14.143633
2019-11-11 1869.00 1896.04 1959.696827 1983.988724 -24.291897
2019-12-16 1983.47 1995.02 1937.990317 1933.233172 4.757145
2019-12-17 2000.00 2001.87 1949.604805 1936.217389 13.387416
2020-01-27 1906.41 1908.89 1999.350830 2002.454241 -3.103410
2020-01-28 1914.67 1917.45 1984.459770 1998.758402 -14.298632
2020-05-20 1578.52 1599.15 1476.125305 1458.116231 18.009074
2020-05-21 1605.00 1595.68 1497.862522 1464.097265 33.765258
trade_signal signal_change entry_exit
date
2019-01-28 1.0 1.0 0.0
2019-01-29 1.0 0.0 1.0
2019-03-04 0.0 -1.0 0.0
2019-03-05 0.0 0.0 -1.0
2019-04-11 1.0 1.0 0.0
2019-04-12 1.0 0.0 1.0
2019-05-09 0.0 -1.0 0.0
2019-05-10 0.0 0.0 -1.0
2019-06-14 1.0 1.0 0.0
2019-06-17 1.0 0.0 1.0
2019-08-07 0.0 -1.0 0.0
2019-08-08 1.0 1.0 -1.0
2019-08-09 1.0 0.0 1.0
2019-11-08 0.0 -1.0 0.0
2019-11-11 0.0 0.0 -1.0
2019-12-16 1.0 1.0 0.0
2019-12-17 1.0 0.0 1.0
2020-01-27 0.0 -1.0 0.0
2020-01-28 0.0 0.0 -1.0
2020-05-20 1.0 1.0 0.0
2020-05-21 1.0 0.0 1.0
List the signal change and entry/exit points for EMA_025_SlowMA_45_FastMA_15
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-30 1825.33 1818.70 1760.012739 1758.995742 1.016997
2019-01-31 1820.37 1832.81 1769.113091 1762.347832 6.765260
2019-03-06 1748.37 1751.62 1812.477061 1816.908959 -4.431898
2019-03-07 1746.50 1725.01 1801.543644 1812.853922 -11.310278
2019-04-12 1827.87 1833.07 1786.287695 1784.063868 2.223828
2019-04-15 1834.00 1846.23 1793.780484 1786.778725 7.001759
2019-05-13 1800.00 1777.26 1805.460795 1806.130540 -0.669745
2019-05-14 1787.12 1793.67 1803.986946 1805.587793 -1.600848
2019-06-19 1812.00 1842.06 1780.777592 1776.400706 4.376886
2019-06-20 1862.07 1861.31 1790.844143 1780.094524 10.749619
2019-11-08 1941.00 1879.19 1987.449702 1987.986422 -0.536720
2019-11-11 1869.00 1896.04 1976.023489 1983.988724 -7.965236
2019-12-17 2000.00 2001.87 1937.504373 1936.217389 1.286984
2019-12-18 2008.67 1991.51 1944.255077 1938.621420 5.633656
2020-01-29 1924.04 1893.95 1986.816952 1994.201512 -7.384560
2020-01-30 1871.42 1872.09 1972.476083 1988.892312 -16.416229
2020-05-21 1605.00 1595.68 1474.134694 1464.097265 10.037429
2020-05-22 1591.74 1631.30 1493.780357 1471.366949 22.413408
trade_signal signal_change entry_exit
date
2019-01-30 1.0 1.0 0.0
2019-01-31 1.0 0.0 1.0
2019-03-06 0.0 -1.0 0.0
2019-03-07 0.0 0.0 -1.0
2019-04-12 1.0 1.0 0.0
2019-04-15 1.0 0.0 1.0
2019-05-13 0.0 -1.0 0.0
2019-05-14 0.0 0.0 -1.0
2019-06-19 1.0 1.0 0.0
2019-06-20 1.0 0.0 1.0
2019-11-08 0.0 -1.0 0.0
2019-11-11 0.0 0.0 -1.0
2019-12-17 1.0 1.0 0.0
2019-12-18 1.0 0.0 1.0
2020-01-29 0.0 -1.0 0.0
2020-01-30 0.0 0.0 -1.0
2020-05-21 1.0 1.0 0.0
2020-05-22 1.0 0.0 1.0
List the signal change and entry/exit points for EMA_026_SlowMA_45_FastMA_20
open_price close_price fast_ma slow_ma ma_change \
date
2019-02-01 1824.05 1836.96 1768.319814 1765.729615 2.590199
2019-02-04 1840.39 1860.99 1777.151476 1770.039318 7.112158
2019-03-07 1746.50 1725.01 1810.902590 1812.853922 -1.951332
2019-03-08 1708.04 1715.82 1801.846497 1808.575073 -6.728576
2019-04-15 1834.00 1846.23 1788.866175 1786.778725 2.087450
2019-04-16 1851.80 1841.70 1793.897990 1789.176729 4.721261
2019-05-17 1786.37 1787.29 1803.234855 1804.052318 -0.817463
2019-05-20 1769.73 1752.23 1798.377248 1801.795747 -3.418499
2019-06-20 1862.07 1861.31 1784.149442 1780.094524 4.054918
2019-06-21 1859.36 1880.00 1793.278067 1784.440615 8.837452
2019-11-11 1869.00 1896.04 1983.589083 1983.988724 -0.399641
2019-11-12 1901.35 1875.84 1973.327266 1979.286576 -5.959310
2019-12-19 1996.00 2003.12 1944.325056 1941.425712 2.899344
2019-12-20 2017.00 2023.26 1951.842670 1944.983731 6.858938
2020-01-30 1871.42 1872.09 1983.479013 1988.892312 -5.413299
2020-01-31 1865.93 1830.55 1968.914345 1982.007860 -13.093515
2020-05-22 1591.74 1631.30 1476.278246 1471.366949 4.911297
2020-05-26 1704.32 1746.91 1502.052699 1483.347082 18.705617
trade_signal signal_change entry_exit
date
2019-02-01 1.0 1.0 0.0
2019-02-04 1.0 0.0 1.0
2019-03-07 0.0 -1.0 0.0
2019-03-08 0.0 0.0 -1.0
2019-04-15 1.0 1.0 0.0
2019-04-16 1.0 0.0 1.0
2019-05-17 0.0 -1.0 0.0
2019-05-20 0.0 0.0 -1.0
2019-06-20 1.0 1.0 0.0
2019-06-21 1.0 0.0 1.0
2019-11-11 0.0 -1.0 0.0
2019-11-12 0.0 0.0 -1.0
2019-12-19 1.0 1.0 0.0
2019-12-20 1.0 0.0 1.0
2020-01-30 0.0 -1.0 0.0
2020-01-31 0.0 0.0 -1.0
2020-05-22 1.0 1.0 0.0
2020-05-26 1.0 0.0 1.0
List the signal change and entry/exit points for EMA_027_SlowMA_50_FastMA_05
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-25 1811.99 1802.20 1766.505759 1754.061832 12.443927
2019-01-28 1787.62 1813.60 1782.203839 1756.561251 25.642588
2019-03-01 1708.20 1714.08 1796.547426 1826.138376 -29.590950
2019-03-04 1723.66 1707.82 1766.971617 1821.378439 -54.406821
2019-04-09 1776.75 1794.47 1781.606141 1780.320886 1.285255
2019-04-10 1793.85 1806.00 1789.737427 1781.336605 8.400823
2019-05-07 1781.45 1785.00 1809.790374 1810.875395 -1.085021
2019-05-08 1765.01 1751.63 1790.403583 1808.542708 -18.139126
2019-06-11 1799.50 1803.63 1773.487703 1770.225765 3.261938
2019-06-12 1804.17 1798.90 1781.958468 1771.351970 10.606498
2019-08-05 1819.98 1788.60 1850.994684 1855.317894 -4.323210
2019-08-06 1799.20 1786.52 1829.503123 1852.619033 -23.115910
2019-08-08 1900.00 1941.01 1864.906943 1854.915819 9.991124
2019-08-09 1926.54 1917.69 1882.501296 1857.378284 25.123012
2019-10-08 1937.05 1938.19 1955.359027 1956.889523 -1.530496
2019-10-09 1953.72 1943.33 1951.349351 1956.357747 -5.008396
2019-10-11 1984.30 1977.18 1962.528600 1957.421235 5.107365
2019-10-14 1964.52 1988.75 1971.269067 1958.649875 12.619192
2019-11-07 1942.20 1849.93 1965.462045 1989.076615 -23.614570
2019-11-08 1941.00 1879.19 1936.704697 1984.767237 -48.062540
2019-12-13 1960.87 1973.60 1941.352128 1932.071832 9.280296
2019-12-16 1983.47 1995.02 1959.241419 1934.540408 24.701010
2020-01-24 1998.00 1962.96 1997.547711 2003.244280 -5.696569
2020-01-27 1906.41 1908.89 1967.995140 1999.544101 -31.548961
2020-02-19 1982.76 1968.49 1963.931653 1963.850093 0.081560
2020-02-20 1960.00 1970.91 1966.257768 1964.126952 2.130816
2020-02-21 1965.00 1928.72 1953.745179 1962.738442 -8.993263
2020-02-24 1830.93 1792.54 1900.010119 1956.063985 -56.053865
2020-05-19 1556.29 1547.56 1478.993822 1462.839017 16.154804
2020-05-20 1578.52 1599.15 1519.045881 1468.184547 50.861334
trade_signal signal_change entry_exit
date
2019-01-25 1.0 1.0 0.0
2019-01-28 1.0 0.0 1.0
2019-03-01 0.0 -1.0 0.0
2019-03-04 0.0 0.0 -1.0
2019-04-09 1.0 1.0 0.0
2019-04-10 1.0 0.0 1.0
2019-05-07 0.0 -1.0 0.0
2019-05-08 0.0 0.0 -1.0
2019-06-11 1.0 1.0 0.0
2019-06-12 1.0 0.0 1.0
2019-08-05 0.0 -1.0 0.0
2019-08-06 0.0 0.0 -1.0
2019-08-08 1.0 1.0 0.0
2019-08-09 1.0 0.0 1.0
2019-10-08 0.0 -1.0 0.0
2019-10-09 0.0 0.0 -1.0
2019-10-11 1.0 1.0 0.0
2019-10-14 1.0 0.0 1.0
2019-11-07 0.0 -1.0 0.0
2019-11-08 0.0 0.0 -1.0
2019-12-13 1.0 1.0 0.0
2019-12-16 1.0 0.0 1.0
2020-01-24 0.0 -1.0 0.0
2020-01-27 0.0 0.0 -1.0
2020-02-19 1.0 1.0 0.0
2020-02-20 1.0 0.0 1.0
2020-02-21 0.0 -1.0 0.0
2020-02-24 0.0 0.0 -1.0
2020-05-19 1.0 1.0 0.0
2020-05-20 1.0 0.0 1.0
List the signal change and entry/exit points for EMA_028_SlowMA_50_FastMA_10
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-29 1816.62 1808.80 1765.044832 1758.748194 6.296639
2019-01-30 1825.33 1818.70 1774.800325 1761.251409 13.548916
2019-03-04 1723.66 1707.82 1815.097510 1821.378439 -6.280929
2019-03-05 1715.00 1745.93 1802.521599 1818.346231 -15.824631
2019-04-11 1810.00 1818.59 1785.980965 1782.809637 3.171328
2019-04-12 1827.87 1833.07 1794.542608 1784.796330 9.746277
2019-05-09 1729.43 1736.03 1797.044576 1805.688094 -8.643519
2019-05-10 1825.00 1829.85 1803.009198 1806.639134 -3.629936
2019-06-17 1776.00 1781.41 1773.449011 1773.287014 0.161996
2019-06-18 1808.38 1808.99 1779.911009 1774.688962 5.222047
2019-08-07 1758.40 1821.56 1851.308809 1851.400639 -0.091830
2019-08-08 1900.00 1941.01 1867.618116 1854.915819 12.702297
2019-08-09 1926.54 1917.69 1876.722095 1857.378284 19.343811
2019-11-08 1941.00 1879.19 1973.842789 1984.767237 -10.924448
2019-11-11 1869.00 1896.04 1959.696827 1981.287661 -21.590834
2019-12-16 1983.47 1995.02 1937.990317 1934.540408 3.449909
2019-12-17 2000.00 2001.87 1949.604805 1937.180806 12.423999
2020-01-27 1906.41 1908.89 1999.350830 1999.544101 -0.193271
2020-01-28 1914.67 1917.45 1984.459770 1996.324716 -11.864946
2020-05-20 1578.52 1599.15 1476.125305 1468.184547 7.940758
2020-05-21 1605.00 1595.68 1497.862522 1473.184369 24.678153
trade_signal signal_change entry_exit
date
2019-01-29 1.0 1.0 0.0
2019-01-30 1.0 0.0 1.0
2019-03-04 0.0 -1.0 0.0
2019-03-05 0.0 0.0 -1.0
2019-04-11 1.0 1.0 0.0
2019-04-12 1.0 0.0 1.0
2019-05-09 0.0 -1.0 0.0
2019-05-10 0.0 0.0 -1.0
2019-06-17 1.0 1.0 0.0
2019-06-18 1.0 0.0 1.0
2019-08-07 0.0 -1.0 0.0
2019-08-08 1.0 1.0 -1.0
2019-08-09 1.0 0.0 1.0
2019-11-08 0.0 -1.0 0.0
2019-11-11 0.0 0.0 -1.0
2019-12-16 1.0 1.0 0.0
2019-12-17 1.0 0.0 1.0
2020-01-27 0.0 -1.0 0.0
2020-01-28 0.0 0.0 -1.0
2020-05-20 1.0 1.0 0.0
2020-05-21 1.0 0.0 1.0
List the signal change and entry/exit points for EMA_029_SlowMA_50_FastMA_15
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-31 1820.37 1832.81 1769.113091 1764.231687 4.881404
2019-02-01 1824.05 1836.96 1777.594521 1767.253332 10.341189
2019-03-06 1748.37 1751.62 1812.477061 1815.667168 -3.190107
2019-03-07 1746.50 1725.01 1801.543644 1812.030675 -10.487031
2019-04-12 1827.87 1833.07 1786.287695 1784.796330 1.491365
2019-04-15 1834.00 1846.23 1793.780484 1787.223924 6.556560
2019-05-13 1800.00 1777.26 1805.460795 1805.482906 -0.022111
2019-05-14 1787.12 1793.67 1803.986946 1805.018070 -1.031124
2019-06-19 1812.00 1842.06 1780.777592 1777.334282 3.443310
2019-06-20 1862.07 1861.31 1790.844143 1780.631422 10.212721
2019-11-11 1869.00 1896.04 1976.023489 1981.287661 -5.264172
2019-11-12 1901.35 1875.84 1963.500553 1977.152371 -13.651818
2019-12-17 2000.00 2001.87 1937.504373 1937.180806 0.323567
2019-12-18 2008.67 1991.51 1944.255077 1939.311379 4.943697
2020-01-29 1924.04 1893.95 1986.816952 1992.310011 -5.493058
2020-01-30 1871.42 1872.09 1972.476083 1987.595488 -15.119405
2020-05-21 1605.00 1595.68 1474.134694 1473.184369 0.950325
2020-05-22 1591.74 1631.30 1493.780357 1479.384983 14.395375
trade_signal signal_change entry_exit
date
2019-01-31 1.0 1.0 0.0
2019-02-01 1.0 0.0 1.0
2019-03-06 0.0 -1.0 0.0
2019-03-07 0.0 0.0 -1.0
2019-04-12 1.0 1.0 0.0
2019-04-15 1.0 0.0 1.0
2019-05-13 0.0 -1.0 0.0
2019-05-14 0.0 0.0 -1.0
2019-06-19 1.0 1.0 0.0
2019-06-20 1.0 0.0 1.0
2019-11-11 0.0 -1.0 0.0
2019-11-12 0.0 0.0 -1.0
2019-12-17 1.0 1.0 0.0
2019-12-18 1.0 0.0 1.0
2020-01-29 0.0 -1.0 0.0
2020-01-30 0.0 0.0 -1.0
2020-05-21 1.0 1.0 0.0
2020-05-22 1.0 0.0 1.0
List the signal change and entry/exit points for EMA_030_SlowMA_50_FastMA_20
open_price close_price fast_ma slow_ma ma_change \
date
2019-02-01 1824.05 1836.96 1768.319814 1767.253332 1.066482
2019-02-04 1840.39 1860.99 1777.151476 1771.138753 6.012723
2019-03-07 1746.50 1725.01 1810.902590 1812.030675 -1.128085
2019-03-08 1708.04 1715.82 1801.846497 1808.174875 -6.328378
2019-04-15 1834.00 1846.23 1788.866175 1787.223924 1.642251
2019-04-16 1851.80 1841.70 1793.897990 1789.375939 4.522052
2019-05-17 1786.37 1787.29 1803.234855 1803.690186 -0.455331
2019-05-20 1769.73 1752.23 1798.377248 1801.666256 -3.289009
2019-06-20 1862.07 1861.31 1784.149442 1780.631422 3.518019
2019-06-21 1859.36 1880.00 1793.278067 1784.532748 8.745319
2019-11-12 1901.35 1875.84 1973.327266 1977.152371 -3.825105
2019-11-13 1855.59 1859.09 1962.447526 1972.522380 -10.074853
2019-12-19 1996.00 2003.12 1944.325056 1941.813697 2.511359
2019-12-20 2017.00 2023.26 1951.842670 1945.007692 6.834978
2020-01-30 1871.42 1872.09 1983.479013 1987.595488 -4.116475
2020-01-31 1865.93 1830.55 1968.914345 1981.436827 -12.522481
2020-05-26 1704.32 1746.91 1502.052699 1489.876161 12.176538
2020-05-27 1775.93 1698.73 1520.783871 1498.066508 22.717362
trade_signal signal_change entry_exit
date
2019-02-01 1.0 1.0 0.0
2019-02-04 1.0 0.0 1.0
2019-03-07 0.0 -1.0 0.0
2019-03-08 0.0 0.0 -1.0
2019-04-15 1.0 1.0 0.0
2019-04-16 1.0 0.0 1.0
2019-05-17 0.0 -1.0 0.0
2019-05-20 0.0 0.0 -1.0
2019-06-20 1.0 1.0 0.0
2019-06-21 1.0 0.0 1.0
2019-11-12 0.0 -1.0 0.0
2019-11-13 0.0 0.0 -1.0
2019-12-19 1.0 1.0 0.0
2019-12-20 1.0 0.0 1.0
2020-01-30 0.0 -1.0 0.0
2020-01-31 0.0 0.0 -1.0
2020-05-26 1.0 1.0 0.0
2020-05-27 1.0 0.0 1.0
if verbose:
for key in model_collection:
graph_data = model_collection[key].copy()
title_string = "Exponential Moving Average Crossover Model for " + key
fig = plt.figure(figsize=(16,9))
ylabel = stock_symbol + ' price in $'
ax1 = fig.add_subplot(111, ylabel=ylabel, title=title_string)
graph_data['fast_ma'].plot(ax=ax1, color='b', lw=2.)
graph_data['slow_ma'].plot(ax=ax1, color='r', lw=2.)
graph_data['close_price'].plot(ax=ax1, color='g')
ax1.plot(graph_data.loc[graph_data.entry_exit == 1].index, graph_data.close_price[graph_data.entry_exit == 1], '^', markersize=7, color='k',label='buy')
ax1.plot(graph_data.loc[graph_data.entry_exit == -1].index, graph_data.close_price[graph_data.entry_exit == -1], 'v', markersize=7, color='k',label='sell')
plt.legend(loc='upper left')
plt.show()
def trading_portfolio_generation(initial_fund, trading_model):
# Construct a portfolio to track the transactions and returns
portfolio = pd.DataFrame(index=trading_model.index, columns=['trade_action', 'qty_onhand', 'cost_basis', 'sold_transaction', 'gain_loss', 'cash_onhand', 'position_value', 'total_position', 'accumu_return'])
portfolio.iloc[0]['trade_action'] = 0
portfolio.iloc[0]['qty_onhand'] = 0
portfolio.iloc[0]['cost_basis'] = 0.00
portfolio.iloc[0]['sold_transaction'] = 0.00
portfolio.iloc[0]['gain_loss'] = 0.00
portfolio.iloc[0]['cash_onhand'] = initial_capital
portfolio.iloc[0]['position_value'] = 0.00
portfolio.iloc[0]['total_position'] = initial_capital
portfolio.iloc[0]['accumu_return'] = portfolio.iloc[0]['total_position'] - initial_fund
recent_cost = 0
# The conditional parameters below determine how the trading strategy will be carried out
for i in range(1, len(portfolio)):
if (trading_model.iloc[i]['entry_exit'] == 1) and (portfolio.iloc[i-1]['qty_onhand'] == 0):
portfolio.iloc[i]['trade_action'] = 1
portfolio.iloc[i]['qty_onhand'] = portfolio.iloc[i-1]['qty_onhand'] + portfolio.iloc[i]['trade_action']
portfolio.iloc[i]['cost_basis'] = trading_model.iloc[i]['open_price'] * portfolio.iloc[i]['trade_action']
portfolio.iloc[i]['sold_transaction'] = 0.00
portfolio.iloc[i]['gain_loss'] = 0.00
portfolio.iloc[i]['cash_onhand'] = portfolio.iloc[i-1]['cash_onhand'] - portfolio.iloc[i]['cost_basis']
recent_cost = trading_model.iloc[i]['open_price'] * portfolio.iloc[i]['trade_action']
if verbose: print('BOUGHT QTY:', portfolio.iloc[i]['trade_action'], 'on', portfolio.index[i], 'at the price of', trading_model.iloc[i]['open_price'])
elif (trading_model.iloc[i]['entry_exit'] == -1) and (portfolio.iloc[i-1]['qty_onhand'] > 0):
portfolio.iloc[i]['trade_action'] = -1
portfolio.iloc[i]['qty_onhand'] = portfolio.iloc[i-1]['qty_onhand'] + portfolio.iloc[i]['trade_action']
portfolio.iloc[i]['cost_basis'] = 0.00
portfolio.iloc[i]['sold_transaction'] = trading_model.iloc[i]['open_price'] * portfolio.iloc[i]['trade_action'] * -1
portfolio.iloc[i]['gain_loss'] = (recent_cost + (trading_model.iloc[i]['open_price'] * portfolio.iloc[i]['trade_action'])) * -1
portfolio.iloc[i]['cash_onhand'] = portfolio.iloc[i-1]['cash_onhand'] + portfolio.iloc[i]['sold_transaction']
recent_cost = 0.00
if verbose: print('SOLD QTY:', portfolio.iloc[i]['trade_action'], 'on', portfolio.index[i], 'at the price of', trading_model.iloc[i]['open_price'])
else:
portfolio.iloc[i]['trade_action'] = 0
portfolio.iloc[i]['qty_onhand'] = portfolio.iloc[i-1]['qty_onhand']
portfolio.iloc[i]['cost_basis'] = portfolio.iloc[i-1]['cost_basis']
portfolio.iloc[i]['sold_transaction'] = 0.00
portfolio.iloc[i]['gain_loss'] = 0.00
portfolio.iloc[i]['cash_onhand'] = portfolio.iloc[i-1]['cash_onhand']
portfolio.iloc[i]['position_value'] = trading_model.iloc[i]['close_price'] * portfolio.iloc[i]['qty_onhand']
portfolio.iloc[i]['total_position'] = portfolio.iloc[i]['cash_onhand'] + portfolio.iloc[i]['position_value']
portfolio.iloc[i]['accumu_return'] = portfolio.iloc[i]['total_position'] - initial_fund
return portfolio
portfolio_collection = {}
# Build dataframe for reporting model performance summary
performance_summary = pd.DataFrame(columns=['model_name','return_value','return_percent'])
for key in model_collection:
print('Processing portfolio for model:', key)
portfolio_collection[key] = trading_portfolio_generation(initial_capital, model_collection[key])
trade_transactions = portfolio_collection[key][portfolio_collection[key].trade_action != 0]
print(trade_transactions)
print('Accumulated profit/loss for one share of stock with initial capital of $%.0f at the end of modeling period: $%.2f' % (initial_capital, portfolio_collection[key].accumu_return[-1]))
if initial_capital != 0:
return_percentage = portfolio_collection[key].accumu_return[-1] / initial_capital * 100
print('Accumulated return percentage based on the initial capital investment: %.2f%%' % (return_percentage))
else:
return_percentage = None
if trade_transactions.iloc[-1]['trade_action'] == 1:
print('The current status of the model is:', 'Holding a position since', trade_transactions.index.tolist()[-1], '\n')
else:
print('The current status of the model is:', 'Waiting to enter since', trade_transactions.index.tolist()[-1], '\n')
performance_summary = performance_summary.append({'model_name': key, 'return_value': portfolio_collection[key].accumu_return[-1],
'return_percent': return_percentage}, ignore_index=True)
Processing portfolio for model: EMA_001_SlowMA_10_FastMA_05
BOUGHT QTY: 1 on 2019-01-18 00:00:00 at the price of 1747.02
SOLD QTY: -1 on 2019-03-01 00:00:00 at the price of 1708.2
BOUGHT QTY: 1 on 2019-03-21 00:00:00 at the price of 1765.8
SOLD QTY: -1 on 2019-03-25 00:00:00 at the price of 1714.01
BOUGHT QTY: 1 on 2019-03-27 00:00:00 at the price of 1768.98
SOLD QTY: -1 on 2019-03-28 00:00:00 at the price of 1759.99
BOUGHT QTY: 1 on 2019-04-03 00:00:00 at the price of 1778.47
SOLD QTY: -1 on 2019-05-03 00:00:00 at the price of 1816.17
BOUGHT QTY: 1 on 2019-06-06 00:00:00 at the price of 1766.01
SOLD QTY: -1 on 2019-07-18 00:00:00 at the price of 1861.83
BOUGHT QTY: 1 on 2019-07-19 00:00:00 at the price of 1896.03
SOLD QTY: -1 on 2019-08-02 00:00:00 at the price of 1874.11
BOUGHT QTY: 1 on 2019-08-12 00:00:00 at the price of 1900.44
SOLD QTY: -1 on 2019-09-25 00:00:00 at the price of 1991.65
BOUGHT QTY: 1 on 2019-10-15 00:00:00 at the price of 1992.21
SOLD QTY: -1 on 2019-11-05 00:00:00 at the price of 2008.99
BOUGHT QTY: 1 on 2019-11-29 00:00:00 at the price of 1904.89
SOLD QTY: -1 on 2019-12-04 00:00:00 at the price of 1894.64
BOUGHT QTY: 1 on 2019-12-05 00:00:00 at the price of 1929.0
SOLD QTY: -1 on 2020-01-21 00:00:00 at the price of 2006.0
BOUGHT QTY: 1 on 2020-02-13 00:00:00 at the price of 1944.0
SOLD QTY: -1 on 2020-02-25 00:00:00 at the price of 1803.0
BOUGHT QTY: 1 on 2020-04-08 00:00:00 at the price of 1382.65
SOLD QTY: -1 on 2020-04-23 00:00:00 at the price of 1354.05
BOUGHT QTY: 1 on 2020-04-29 00:00:00 at the price of 1487.83
SOLD QTY: -1 on 2020-05-07 00:00:00 at the price of 1392.26
BOUGHT QTY: 1 on 2020-05-08 00:00:00 at the price of 1416.69
SOLD QTY: -1 on 2020-05-13 00:00:00 at the price of 1379.34
BOUGHT QTY: 1 on 2020-05-19 00:00:00 at the price of 1556.29
SOLD QTY: -1 on 2020-06-12 00:00:00 at the price of 1653.57
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-18 1 1 1747.02 0 0
2019-03-01 -1 0 0 1708.2 -38.82
2019-03-21 1 1 1765.8 0 0
2019-03-25 -1 0 0 1714.01 -51.79
2019-03-27 1 1 1768.98 0 0
2019-03-28 -1 0 0 1759.99 -8.99
2019-04-03 1 1 1778.47 0 0
2019-05-03 -1 0 0 1816.17 37.7
2019-06-06 1 1 1766.01 0 0
2019-07-18 -1 0 0 1861.83 95.82
2019-07-19 1 1 1896.03 0 0
2019-08-02 -1 0 0 1874.11 -21.92
2019-08-12 1 1 1900.44 0 0
2019-09-25 -1 0 0 1991.65 91.21
2019-10-15 1 1 1992.21 0 0
2019-11-05 -1 0 0 2008.99 16.78
2019-11-29 1 1 1904.89 0 0
2019-12-04 -1 0 0 1894.64 -10.25
2019-12-05 1 1 1929 0 0
2020-01-21 -1 0 0 2006 77
2020-02-13 1 1 1944 0 0
2020-02-25 -1 0 0 1803 -141
2020-04-08 1 1 1382.65 0 0
2020-04-23 -1 0 0 1354.05 -28.6
2020-04-29 1 1 1487.83 0 0
2020-05-07 -1 0 0 1392.26 -95.57
2020-05-08 1 1 1416.69 0 0
2020-05-13 -1 0 0 1379.34 -37.35
2020-05-19 1 1 1556.29 0 0
2020-06-12 -1 0 0 1653.57 97.28
cash_onhand position_value total_position accumu_return
date
2019-01-18 -1747.02 1760.26 13.24 13.24
2019-03-01 -38.82 0 -38.82 -38.82
2019-03-21 -1804.62 1774.36 -30.26 -30.26
2019-03-25 -90.61 0 -90.61 -90.61
2019-03-27 -1859.59 1752.11 -107.48 -107.48
2019-03-28 -99.6 0 -99.6 -99.6
2019-04-03 -1878.07 1774.93 -103.14 -103.14
2019-05-03 -61.9 0 -61.9 -61.9
2019-06-06 -1827.91 1754.86 -73.05 -73.05
2019-07-18 33.92 0 33.92 33.92
2019-07-19 -1862.11 1882.09 19.98 19.98
2019-08-02 12 0 12 12
2019-08-12 -1888.44 1916.89 28.45 28.45
2019-09-25 103.21 0 103.21 103.21
2019-10-15 -1889 2016.39 127.39 127.39
2019-11-05 119.99 0 119.99 119.99
2019-11-29 -1784.9 1904.03 119.13 119.13
2019-12-04 109.74 0 109.74 109.74
2019-12-05 -1819.26 1904.22 84.96 84.96
2020-01-21 186.74 0 186.74 186.74
2020-02-13 -1757.26 1959.94 202.68 202.68
2020-02-25 45.74 0 45.74 45.74
2020-04-08 -1336.91 1372.06 35.15 35.15
2020-04-23 17.14 0 17.14 17.14
2020-04-29 -1470.69 1520.53 49.84 49.84
2020-05-07 -78.43 0 -78.43 -78.43
2020-05-08 -1495.12 1430.83 -64.29 -64.29
2020-05-13 -115.78 0 -115.78 -115.78
2020-05-19 -1672.07 1547.56 -124.51 -124.51
2020-06-12 -18.5 0 -18.5 -18.5
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $-18.50
The current status of the model is: Waiting to enter since 2020-06-12 00:00:00
Processing portfolio for model: EMA_002_SlowMA_15_FastMA_05
BOUGHT QTY: 1 on 2019-01-22 00:00:00 at the price of 1743.18
SOLD QTY: -1 on 2019-03-01 00:00:00 at the price of 1708.2
BOUGHT QTY: 1 on 2019-04-04 00:00:00 at the price of 1775.31
SOLD QTY: -1 on 2019-05-03 00:00:00 at the price of 1816.17
BOUGHT QTY: 1 on 2019-06-10 00:00:00 at the price of 1782.57
SOLD QTY: -1 on 2019-08-05 00:00:00 at the price of 1819.98
BOUGHT QTY: 1 on 2019-08-12 00:00:00 at the price of 1900.44
SOLD QTY: -1 on 2019-09-26 00:00:00 at the price of 1994.08
BOUGHT QTY: 1 on 2019-10-16 00:00:00 at the price of 2016.8
SOLD QTY: -1 on 2019-11-07 00:00:00 at the price of 1942.2
BOUGHT QTY: 1 on 2019-12-05 00:00:00 at the price of 1929.0
SOLD QTY: -1 on 2020-01-22 00:00:00 at the price of 2004.33
BOUGHT QTY: 1 on 2020-02-14 00:00:00 at the price of 1998.44
SOLD QTY: -1 on 2020-02-25 00:00:00 at the price of 1803.0
BOUGHT QTY: 1 on 2020-04-09 00:00:00 at the price of 1424.76
SOLD QTY: -1 on 2020-04-24 00:00:00 at the price of 1372.39
BOUGHT QTY: 1 on 2020-04-28 00:00:00 at the price of 1434.2
SOLD QTY: -1 on 2020-05-07 00:00:00 at the price of 1392.26
BOUGHT QTY: 1 on 2020-05-08 00:00:00 at the price of 1416.69
SOLD QTY: -1 on 2020-05-13 00:00:00 at the price of 1379.34
BOUGHT QTY: 1 on 2020-05-19 00:00:00 at the price of 1556.29
SOLD QTY: -1 on 2020-06-16 00:00:00 at the price of 1716.32
BOUGHT QTY: 1 on 2020-06-17 00:00:00 at the price of 1677.92
SOLD QTY: -1 on 2020-06-18 00:00:00 at the price of 1622.4
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-22 1 1 1743.18 0 0
2019-03-01 -1 0 0 1708.2 -34.98
2019-04-04 1 1 1775.31 0 0
2019-05-03 -1 0 0 1816.17 40.86
2019-06-10 1 1 1782.57 0 0
2019-08-05 -1 0 0 1819.98 37.41
2019-08-12 1 1 1900.44 0 0
2019-09-26 -1 0 0 1994.08 93.64
2019-10-16 1 1 2016.8 0 0
2019-11-07 -1 0 0 1942.2 -74.6
2019-12-05 1 1 1929 0 0
2020-01-22 -1 0 0 2004.33 75.33
2020-02-14 1 1 1998.44 0 0
2020-02-25 -1 0 0 1803 -195.44
2020-04-09 1 1 1424.76 0 0
2020-04-24 -1 0 0 1372.39 -52.37
2020-04-28 1 1 1434.2 0 0
2020-05-07 -1 0 0 1392.26 -41.94
2020-05-08 1 1 1416.69 0 0
2020-05-13 -1 0 0 1379.34 -37.35
2020-05-19 1 1 1556.29 0 0
2020-06-16 -1 0 0 1716.32 160.03
2020-06-17 1 1 1677.92 0 0
2020-06-18 -1 0 0 1622.4 -55.52
cash_onhand position_value total_position accumu_return
date
2019-01-22 -1743.18 1708.98 -34.2 -34.2
2019-03-01 -34.98 0 -34.98 -34.98
2019-04-04 -1810.29 1780.6 -29.69 -29.69
2019-05-03 5.88 0 5.88 5.88
2019-06-10 -1776.69 1781.12 4.43 4.43
2019-08-05 43.29 0 43.29 43.29
2019-08-12 -1857.15 1916.89 59.74 59.74
2019-09-26 136.93 0 136.93 136.93
2019-10-16 -1879.87 2027.63 147.76 147.76
2019-11-07 62.33 0 62.33 62.33
2019-12-05 -1866.67 1904.22 37.55 37.55
2020-01-22 137.66 0 137.66 137.66
2020-02-14 -1860.78 1990.96 130.18 130.18
2020-02-25 -57.78 0 -57.78 -57.78
2020-04-09 -1482.54 1420.64 -61.9 -61.9
2020-04-24 -110.15 0 -110.15 -110.15
2020-04-28 -1544.35 1439.32 -105.03 -105.03
2020-05-07 -152.09 0 -152.09 -152.09
2020-05-08 -1568.78 1430.83 -137.95 -137.95
2020-05-13 -189.44 0 -189.44 -189.44
2020-05-19 -1745.73 1547.56 -198.17 -198.17
2020-06-16 -29.41 0 -29.41 -29.41
2020-06-17 -1707.33 1638.24 -69.09 -69.09
2020-06-18 -84.93 0 -84.93 -84.93
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $-84.93
The current status of the model is: Waiting to enter since 2020-06-18 00:00:00
Processing portfolio for model: EMA_003_SlowMA_15_FastMA_10
BOUGHT QTY: 1 on 2019-01-24 00:00:00 at the price of 1748.98
SOLD QTY: -1 on 2019-03-01 00:00:00 at the price of 1708.2
BOUGHT QTY: 1 on 2019-04-05 00:00:00 at the price of 1788.03
SOLD QTY: -1 on 2019-05-08 00:00:00 at the price of 1765.01
BOUGHT QTY: 1 on 2019-06-11 00:00:00 at the price of 1799.5
SOLD QTY: -1 on 2019-08-06 00:00:00 at the price of 1799.2
BOUGHT QTY: 1 on 2019-08-13 00:00:00 at the price of 1907.67
SOLD QTY: -1 on 2019-09-30 00:00:00 at the price of 1953.0
BOUGHT QTY: 1 on 2019-10-17 00:00:00 at the price of 2033.0
SOLD QTY: -1 on 2019-11-08 00:00:00 at the price of 1941.0
BOUGHT QTY: 1 on 2019-12-10 00:00:00 at the price of 1902.4
SOLD QTY: -1 on 2020-01-23 00:00:00 at the price of 1986.24
BOUGHT QTY: 1 on 2020-02-19 00:00:00 at the price of 1982.76
SOLD QTY: -1 on 2020-02-25 00:00:00 at the price of 1803.0
BOUGHT QTY: 1 on 2020-04-14 00:00:00 at the price of 1460.09
SOLD QTY: -1 on 2020-05-14 00:00:00 at the price of 1348.74
BOUGHT QTY: 1 on 2020-05-19 00:00:00 at the price of 1556.29
SOLD QTY: -1 on 2020-06-23 00:00:00 at the price of 1652.3
BOUGHT QTY: 1 on 2020-06-24 00:00:00 at the price of 1660.71
SOLD QTY: -1 on 2020-06-25 00:00:00 at the price of 1585.81
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-24 1 1 1748.98 0 0
2019-03-01 -1 0 0 1708.2 -40.78
2019-04-05 1 1 1788.03 0 0
2019-05-08 -1 0 0 1765.01 -23.02
2019-06-11 1 1 1799.5 0 0
2019-08-06 -1 0 0 1799.2 -0.3
2019-08-13 1 1 1907.67 0 0
2019-09-30 -1 0 0 1953 45.33
2019-10-17 1 1 2033 0 0
2019-11-08 -1 0 0 1941 -92
2019-12-10 1 1 1902.4 0 0
2020-01-23 -1 0 0 1986.24 83.84
2020-02-19 1 1 1982.76 0 0
2020-02-25 -1 0 0 1803 -179.76
2020-04-14 1 1 1460.09 0 0
2020-05-14 -1 0 0 1348.74 -111.35
2020-05-19 1 1 1556.29 0 0
2020-06-23 -1 0 0 1652.3 96.01
2020-06-24 1 1 1660.71 0 0
2020-06-25 -1 0 0 1585.81 -74.9
cash_onhand position_value total_position accumu_return
date
2019-01-24 -1748.98 1795.67 46.69 46.69
2019-03-01 -40.78 0 -40.78 -40.78
2019-04-05 -1828.81 1769.45 -59.36 -59.36
2019-05-08 -63.8 0 -63.8 -63.8
2019-06-11 -1863.3 1803.63 -59.67 -59.67
2019-08-06 -64.1 0 -64.1 -64.1
2019-08-13 -1971.77 1943.19 -28.58 -28.58
2019-09-30 -18.77 0 -18.77 -18.77
2019-10-17 -2051.77 2028.53 -23.24 -23.24
2019-11-08 -110.77 0 -110.77 -110.77
2019-12-10 -2013.17 1904.63 -108.54 -108.54
2020-01-23 -26.93 0 -26.93 -26.93
2020-02-19 -2009.69 1968.49 -41.2 -41.2
2020-02-25 -206.69 0 -206.69 -206.69
2020-04-14 -1666.78 1449.42 -217.36 -217.36
2020-05-14 -318.04 0 -318.04 -318.04
2020-05-19 -1874.33 1547.56 -326.77 -326.77
2020-06-23 -222.03 0 -222.03 -222.03
2020-06-24 -1882.74 1610.33 -272.41 -272.41
2020-06-25 -296.93 0 -296.93 -296.93
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $-296.93
The current status of the model is: Waiting to enter since 2020-06-25 00:00:00
Processing portfolio for model: EMA_004_SlowMA_20_FastMA_05
BOUGHT QTY: 1 on 2019-01-22 00:00:00 at the price of 1743.18
SOLD QTY: -1 on 2019-03-01 00:00:00 at the price of 1708.2
BOUGHT QTY: 1 on 2019-04-05 00:00:00 at the price of 1788.03
SOLD QTY: -1 on 2019-05-07 00:00:00 at the price of 1781.45
BOUGHT QTY: 1 on 2019-06-10 00:00:00 at the price of 1782.57
SOLD QTY: -1 on 2019-08-05 00:00:00 at the price of 1819.98
BOUGHT QTY: 1 on 2019-08-12 00:00:00 at the price of 1900.44
SOLD QTY: -1 on 2019-09-27 00:00:00 at the price of 1969.56
BOUGHT QTY: 1 on 2019-10-16 00:00:00 at the price of 2016.8
SOLD QTY: -1 on 2019-11-08 00:00:00 at the price of 1941.0
BOUGHT QTY: 1 on 2019-12-09 00:00:00 at the price of 1928.08
SOLD QTY: -1 on 2020-01-22 00:00:00 at the price of 2004.33
BOUGHT QTY: 1 on 2020-02-18 00:00:00 at the price of 1972.25
SOLD QTY: -1 on 2020-02-25 00:00:00 at the price of 1803.0
BOUGHT QTY: 1 on 2020-04-14 00:00:00 at the price of 1460.09
SOLD QTY: -1 on 2020-04-23 00:00:00 at the price of 1354.05
BOUGHT QTY: 1 on 2020-04-29 00:00:00 at the price of 1487.83
SOLD QTY: -1 on 2020-05-13 00:00:00 at the price of 1379.34
BOUGHT QTY: 1 on 2020-05-19 00:00:00 at the price of 1556.29
SOLD QTY: -1 on 2020-06-22 00:00:00 at the price of 1609.74
BOUGHT QTY: 1 on 2020-06-24 00:00:00 at the price of 1660.71
SOLD QTY: -1 on 2020-06-25 00:00:00 at the price of 1585.81
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-22 1 1 1743.18 0 0
2019-03-01 -1 0 0 1708.2 -34.98
2019-04-05 1 1 1788.03 0 0
2019-05-07 -1 0 0 1781.45 -6.58
2019-06-10 1 1 1782.57 0 0
2019-08-05 -1 0 0 1819.98 37.41
2019-08-12 1 1 1900.44 0 0
2019-09-27 -1 0 0 1969.56 69.12
2019-10-16 1 1 2016.8 0 0
2019-11-08 -1 0 0 1941 -75.8
2019-12-09 1 1 1928.08 0 0
2020-01-22 -1 0 0 2004.33 76.25
2020-02-18 1 1 1972.25 0 0
2020-02-25 -1 0 0 1803 -169.25
2020-04-14 1 1 1460.09 0 0
2020-04-23 -1 0 0 1354.05 -106.04
2020-04-29 1 1 1487.83 0 0
2020-05-13 -1 0 0 1379.34 -108.49
2020-05-19 1 1 1556.29 0 0
2020-06-22 -1 0 0 1609.74 53.45
2020-06-24 1 1 1660.71 0 0
2020-06-25 -1 0 0 1585.81 -74.9
cash_onhand position_value total_position accumu_return
date
2019-01-22 -1743.18 1708.98 -34.2 -34.2
2019-03-01 -34.98 0 -34.98 -34.98
2019-04-05 -1823.01 1769.45 -53.56 -53.56
2019-05-07 -41.56 0 -41.56 -41.56
2019-06-10 -1824.13 1781.12 -43.01 -43.01
2019-08-05 -4.15 0 -4.15 -4.15
2019-08-12 -1904.59 1916.89 12.3 12.3
2019-09-27 64.97 0 64.97 64.97
2019-10-16 -1951.83 2027.63 75.8 75.8
2019-11-08 -10.83 0 -10.83 -10.83
2019-12-09 -1938.91 1905.79 -33.12 -33.12
2020-01-22 65.42 0 65.42 65.42
2020-02-18 -1906.83 1976.28 69.45 69.45
2020-02-25 -103.83 0 -103.83 -103.83
2020-04-14 -1563.92 1449.42 -114.5 -114.5
2020-04-23 -209.87 0 -209.87 -209.87
2020-04-29 -1697.7 1520.53 -177.17 -177.17
2020-05-13 -318.36 0 -318.36 -318.36
2020-05-19 -1874.65 1547.56 -327.09 -327.09
2020-06-22 -264.91 0 -264.91 -264.91
2020-06-24 -1925.62 1610.33 -315.29 -315.29
2020-06-25 -339.81 0 -339.81 -339.81
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $-339.81
The current status of the model is: Waiting to enter since 2020-06-25 00:00:00
Processing portfolio for model: EMA_005_SlowMA_20_FastMA_10
BOUGHT QTY: 1 on 2019-01-25 00:00:00 at the price of 1811.99
SOLD QTY: -1 on 2019-03-04 00:00:00 at the price of 1723.66
BOUGHT QTY: 1 on 2019-04-09 00:00:00 at the price of 1776.75
SOLD QTY: -1 on 2019-05-08 00:00:00 at the price of 1765.01
BOUGHT QTY: 1 on 2019-06-12 00:00:00 at the price of 1804.17
SOLD QTY: -1 on 2019-08-06 00:00:00 at the price of 1799.2
BOUGHT QTY: 1 on 2019-08-13 00:00:00 at the price of 1907.67
SOLD QTY: -1 on 2019-10-01 00:00:00 at the price of 1977.0
BOUGHT QTY: 1 on 2019-10-17 00:00:00 at the price of 2033.0
SOLD QTY: -1 on 2019-11-08 00:00:00 at the price of 1941.0
BOUGHT QTY: 1 on 2019-12-13 00:00:00 at the price of 1960.87
SOLD QTY: -1 on 2020-01-24 00:00:00 at the price of 1998.0
BOUGHT QTY: 1 on 2020-02-21 00:00:00 at the price of 1965.0
SOLD QTY: -1 on 2020-02-24 00:00:00 at the price of 1830.93
BOUGHT QTY: 1 on 2020-04-17 00:00:00 at the price of 1469.0
SOLD QTY: -1 on 2020-04-23 00:00:00 at the price of 1354.05
BOUGHT QTY: 1 on 2020-04-29 00:00:00 at the price of 1487.83
SOLD QTY: -1 on 2020-05-14 00:00:00 at the price of 1348.74
BOUGHT QTY: 1 on 2020-05-19 00:00:00 at the price of 1556.29
SOLD QTY: -1 on 2020-06-29 00:00:00 at the price of 1567.77
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-25 1 1 1811.99 0 0
2019-03-04 -1 0 0 1723.66 -88.33
2019-04-09 1 1 1776.75 0 0
2019-05-08 -1 0 0 1765.01 -11.74
2019-06-12 1 1 1804.17 0 0
2019-08-06 -1 0 0 1799.2 -4.97
2019-08-13 1 1 1907.67 0 0
2019-10-01 -1 0 0 1977 69.33
2019-10-17 1 1 2033 0 0
2019-11-08 -1 0 0 1941 -92
2019-12-13 1 1 1960.87 0 0
2020-01-24 -1 0 0 1998 37.13
2020-02-21 1 1 1965 0 0
2020-02-24 -1 0 0 1830.93 -134.07
2020-04-17 1 1 1469 0 0
2020-04-23 -1 0 0 1354.05 -114.95
2020-04-29 1 1 1487.83 0 0
2020-05-14 -1 0 0 1348.74 -139.09
2020-05-19 1 1 1556.29 0 0
2020-06-29 -1 0 0 1567.77 11.48
cash_onhand position_value total_position accumu_return
date
2019-01-25 -1811.99 1802.2 -9.79 -9.79
2019-03-04 -88.33 0 -88.33 -88.33
2019-04-09 -1865.08 1794.47 -70.61 -70.61
2019-05-08 -100.07 0 -100.07 -100.07
2019-06-12 -1904.24 1798.9 -105.34 -105.34
2019-08-06 -105.04 0 -105.04 -105.04
2019-08-13 -2012.71 1943.19 -69.52 -69.52
2019-10-01 -35.71 0 -35.71 -35.71
2019-10-17 -2068.71 2028.53 -40.18 -40.18
2019-11-08 -127.71 0 -127.71 -127.71
2019-12-13 -2088.58 1973.6 -114.98 -114.98
2020-01-24 -90.58 0 -90.58 -90.58
2020-02-21 -2055.58 1928.72 -126.86 -126.86
2020-02-24 -224.65 0 -224.65 -224.65
2020-04-17 -1693.65 1470.87 -222.78 -222.78
2020-04-23 -339.6 0 -339.6 -339.6
2020-04-29 -1827.43 1520.53 -306.9 -306.9
2020-05-14 -478.69 0 -478.69 -478.69
2020-05-19 -2034.98 1547.56 -487.42 -487.42
2020-06-29 -467.21 0 -467.21 -467.21
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $-467.21
The current status of the model is: Waiting to enter since 2020-06-29 00:00:00
Processing portfolio for model: EMA_006_SlowMA_20_FastMA_15
BOUGHT QTY: 1 on 2019-01-28 00:00:00 at the price of 1787.62
SOLD QTY: -1 on 2019-03-05 00:00:00 at the price of 1715.0
BOUGHT QTY: 1 on 2019-04-11 00:00:00 at the price of 1810.0
SOLD QTY: -1 on 2019-05-09 00:00:00 at the price of 1729.43
BOUGHT QTY: 1 on 2019-06-14 00:00:00 at the price of 1808.2
SOLD QTY: -1 on 2019-08-07 00:00:00 at the price of 1758.4
BOUGHT QTY: 1 on 2019-08-12 00:00:00 at the price of 1900.44
SOLD QTY: -1 on 2019-10-04 00:00:00 at the price of 1970.64
BOUGHT QTY: 1 on 2019-10-17 00:00:00 at the price of 2033.0
SOLD QTY: -1 on 2019-11-08 00:00:00 at the price of 1941.0
BOUGHT QTY: 1 on 2019-12-16 00:00:00 at the price of 1983.47
SOLD QTY: -1 on 2020-01-28 00:00:00 at the price of 1914.67
BOUGHT QTY: 1 on 2020-04-30 00:00:00 at the price of 1514.53
SOLD QTY: -1 on 2020-05-14 00:00:00 at the price of 1348.74
BOUGHT QTY: 1 on 2020-05-19 00:00:00 at the price of 1556.29
SOLD QTY: -1 on 2020-06-30 00:00:00 at the price of 1583.9
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-28 1 1 1787.62 0 0
2019-03-05 -1 0 0 1715 -72.62
2019-04-11 1 1 1810 0 0
2019-05-09 -1 0 0 1729.43 -80.57
2019-06-14 1 1 1808.2 0 0
2019-08-07 -1 0 0 1758.4 -49.8
2019-08-12 1 1 1900.44 0 0
2019-10-04 -1 0 0 1970.64 70.2
2019-10-17 1 1 2033 0 0
2019-11-08 -1 0 0 1941 -92
2019-12-16 1 1 1983.47 0 0
2020-01-28 -1 0 0 1914.67 -68.8
2020-04-30 1 1 1514.53 0 0
2020-05-14 -1 0 0 1348.74 -165.79
2020-05-19 1 1 1556.29 0 0
2020-06-30 -1 0 0 1583.9 27.61
cash_onhand position_value total_position accumu_return
date
2019-01-28 -1787.62 1813.6 25.98 25.98
2019-03-05 -72.62 0 -72.62 -72.62
2019-04-11 -1882.62 1818.59 -64.03 -64.03
2019-05-09 -153.19 0 -153.19 -153.19
2019-06-14 -1961.39 1775.5 -185.89 -185.89
2019-08-07 -202.99 0 -202.99 -202.99
2019-08-12 -2103.43 1916.89 -186.54 -186.54
2019-10-04 -132.79 0 -132.79 -132.79
2019-10-17 -2165.79 2028.53 -137.26 -137.26
2019-11-08 -224.79 0 -224.79 -224.79
2019-12-16 -2208.26 1995.02 -213.24 -213.24
2020-01-28 -293.59 0 -293.59 -293.59
2020-04-30 -1808.12 1480.57 -327.55 -327.55
2020-05-14 -459.38 0 -459.38 -459.38
2020-05-19 -2015.67 1547.56 -468.11 -468.11
2020-06-30 -431.77 0 -431.77 -431.77
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $-431.77
The current status of the model is: Waiting to enter since 2020-06-30 00:00:00
Processing portfolio for model: EMA_007_SlowMA_25_FastMA_05
BOUGHT QTY: 1 on 2019-01-24 00:00:00 at the price of 1748.98
SOLD QTY: -1 on 2019-03-01 00:00:00 at the price of 1708.2
BOUGHT QTY: 1 on 2019-04-08 00:00:00 at the price of 1767.92
SOLD QTY: -1 on 2019-05-07 00:00:00 at the price of 1781.45
BOUGHT QTY: 1 on 2019-06-11 00:00:00 at the price of 1799.5
SOLD QTY: -1 on 2019-08-05 00:00:00 at the price of 1819.98
BOUGHT QTY: 1 on 2019-08-12 00:00:00 at the price of 1900.44
SOLD QTY: -1 on 2019-09-30 00:00:00 at the price of 1953.0
BOUGHT QTY: 1 on 2019-10-16 00:00:00 at the price of 2016.8
SOLD QTY: -1 on 2019-11-08 00:00:00 at the price of 1941.0
BOUGHT QTY: 1 on 2019-12-12 00:00:00 at the price of 1930.85
SOLD QTY: -1 on 2020-01-23 00:00:00 at the price of 1986.24
BOUGHT QTY: 1 on 2020-02-18 00:00:00 at the price of 1972.25
SOLD QTY: -1 on 2020-02-25 00:00:00 at the price of 1803.0
BOUGHT QTY: 1 on 2020-04-15 00:00:00 at the price of 1407.84
SOLD QTY: -1 on 2020-04-22 00:00:00 at the price of 1365.01
BOUGHT QTY: 1 on 2020-04-29 00:00:00 at the price of 1487.83
SOLD QTY: -1 on 2020-05-07 00:00:00 at the price of 1392.26
BOUGHT QTY: 1 on 2020-05-08 00:00:00 at the price of 1416.69
SOLD QTY: -1 on 2020-05-13 00:00:00 at the price of 1379.34
BOUGHT QTY: 1 on 2020-05-19 00:00:00 at the price of 1556.29
SOLD QTY: -1 on 2020-06-26 00:00:00 at the price of 1597.3
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-24 1 1 1748.98 0 0
2019-03-01 -1 0 0 1708.2 -40.78
2019-04-08 1 1 1767.92 0 0
2019-05-07 -1 0 0 1781.45 13.53
2019-06-11 1 1 1799.5 0 0
2019-08-05 -1 0 0 1819.98 20.48
2019-08-12 1 1 1900.44 0 0
2019-09-30 -1 0 0 1953 52.56
2019-10-16 1 1 2016.8 0 0
2019-11-08 -1 0 0 1941 -75.8
2019-12-12 1 1 1930.85 0 0
2020-01-23 -1 0 0 1986.24 55.39
2020-02-18 1 1 1972.25 0 0
2020-02-25 -1 0 0 1803 -169.25
2020-04-15 1 1 1407.84 0 0
2020-04-22 -1 0 0 1365.01 -42.83
2020-04-29 1 1 1487.83 0 0
2020-05-07 -1 0 0 1392.26 -95.57
2020-05-08 1 1 1416.69 0 0
2020-05-13 -1 0 0 1379.34 -37.35
2020-05-19 1 1 1556.29 0 0
2020-06-26 -1 0 0 1597.3 41.01
cash_onhand position_value total_position accumu_return
date
2019-01-24 -1748.98 1795.67 46.69 46.69
2019-03-01 -40.78 0 -40.78 -40.78
2019-04-08 -1808.7 1788.72 -19.98 -19.98
2019-05-07 -27.25 0 -27.25 -27.25
2019-06-11 -1826.75 1803.63 -23.12 -23.12
2019-08-05 -6.77 0 -6.77 -6.77
2019-08-12 -1907.21 1916.89 9.68 9.68
2019-09-30 45.79 0 45.79 45.79
2019-10-16 -1971.01 2027.63 56.62 56.62
2019-11-08 -30.01 0 -30.01 -30.01
2019-12-12 -1960.86 1948.48 -12.38 -12.38
2020-01-23 25.38 0 25.38 25.38
2020-02-18 -1946.87 1976.28 29.41 29.41
2020-02-25 -143.87 0 -143.87 -143.87
2020-04-15 -1551.71 1424.61 -127.1 -127.1
2020-04-22 -186.7 0 -186.7 -186.7
2020-04-29 -1674.53 1520.53 -154 -154
2020-05-07 -282.27 0 -282.27 -282.27
2020-05-08 -1698.96 1430.83 -268.13 -268.13
2020-05-13 -319.62 0 -319.62 -319.62
2020-05-19 -1875.91 1547.56 -328.35 -328.35
2020-06-26 -278.61 0 -278.61 -278.61
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $-278.61
The current status of the model is: Waiting to enter since 2020-06-26 00:00:00
Processing portfolio for model: EMA_008_SlowMA_25_FastMA_10
BOUGHT QTY: 1 on 2019-01-28 00:00:00 at the price of 1787.62
SOLD QTY: -1 on 2019-03-04 00:00:00 at the price of 1723.66
BOUGHT QTY: 1 on 2019-04-10 00:00:00 at the price of 1793.85
SOLD QTY: -1 on 2019-05-09 00:00:00 at the price of 1729.43
BOUGHT QTY: 1 on 2019-06-13 00:00:00 at the price of 1802.05
SOLD QTY: -1 on 2019-08-06 00:00:00 at the price of 1799.2
BOUGHT QTY: 1 on 2019-08-12 00:00:00 at the price of 1900.44
SOLD QTY: -1 on 2019-10-03 00:00:00 at the price of 1936.55
BOUGHT QTY: 1 on 2019-10-16 00:00:00 at the price of 2016.8
SOLD QTY: -1 on 2019-11-08 00:00:00 at the price of 1941.0
BOUGHT QTY: 1 on 2019-12-16 00:00:00 at the price of 1983.47
SOLD QTY: -1 on 2020-01-27 00:00:00 at the price of 1906.41
BOUGHT QTY: 1 on 2020-04-30 00:00:00 at the price of 1514.53
SOLD QTY: -1 on 2020-05-14 00:00:00 at the price of 1348.74
BOUGHT QTY: 1 on 2020-05-19 00:00:00 at the price of 1556.29
SOLD QTY: -1 on 2020-06-29 00:00:00 at the price of 1567.77
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-28 1 1 1787.62 0 0
2019-03-04 -1 0 0 1723.66 -63.96
2019-04-10 1 1 1793.85 0 0
2019-05-09 -1 0 0 1729.43 -64.42
2019-06-13 1 1 1802.05 0 0
2019-08-06 -1 0 0 1799.2 -2.85
2019-08-12 1 1 1900.44 0 0
2019-10-03 -1 0 0 1936.55 36.11
2019-10-16 1 1 2016.8 0 0
2019-11-08 -1 0 0 1941 -75.8
2019-12-16 1 1 1983.47 0 0
2020-01-27 -1 0 0 1906.41 -77.06
2020-04-30 1 1 1514.53 0 0
2020-05-14 -1 0 0 1348.74 -165.79
2020-05-19 1 1 1556.29 0 0
2020-06-29 -1 0 0 1567.77 11.48
cash_onhand position_value total_position accumu_return
date
2019-01-28 -1787.62 1813.6 25.98 25.98
2019-03-04 -63.96 0 -63.96 -63.96
2019-04-10 -1857.81 1806 -51.81 -51.81
2019-05-09 -128.38 0 -128.38 -128.38
2019-06-13 -1930.43 1809.52 -120.91 -120.91
2019-08-06 -131.23 0 -131.23 -131.23
2019-08-12 -2031.67 1916.89 -114.78 -114.78
2019-10-03 -95.12 0 -95.12 -95.12
2019-10-16 -2111.92 2027.63 -84.29 -84.29
2019-11-08 -170.92 0 -170.92 -170.92
2019-12-16 -2154.39 1995.02 -159.37 -159.37
2020-01-27 -247.98 0 -247.98 -247.98
2020-04-30 -1762.51 1480.57 -281.94 -281.94
2020-05-14 -413.77 0 -413.77 -413.77
2020-05-19 -1970.06 1547.56 -422.5 -422.5
2020-06-29 -402.29 0 -402.29 -402.29
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $-402.29
The current status of the model is: Waiting to enter since 2020-06-29 00:00:00
Processing portfolio for model: EMA_009_SlowMA_25_FastMA_15
BOUGHT QTY: 1 on 2019-01-29 00:00:00 at the price of 1816.62
SOLD QTY: -1 on 2019-03-05 00:00:00 at the price of 1715.0
BOUGHT QTY: 1 on 2019-04-12 00:00:00 at the price of 1827.87
SOLD QTY: -1 on 2019-05-10 00:00:00 at the price of 1825.0
BOUGHT QTY: 1 on 2019-06-14 00:00:00 at the price of 1808.2
SOLD QTY: -1 on 2019-08-07 00:00:00 at the price of 1758.4
BOUGHT QTY: 1 on 2019-08-09 00:00:00 at the price of 1926.54
SOLD QTY: -1 on 2019-10-08 00:00:00 at the price of 1937.05
BOUGHT QTY: 1 on 2019-10-16 00:00:00 at the price of 2016.8
SOLD QTY: -1 on 2019-11-08 00:00:00 at the price of 1941.0
BOUGHT QTY: 1 on 2019-12-17 00:00:00 at the price of 2000.0
SOLD QTY: -1 on 2020-01-28 00:00:00 at the price of 1914.67
BOUGHT QTY: 1 on 2020-05-01 00:00:00 at the price of 1442.75
SOLD QTY: -1 on 2020-05-07 00:00:00 at the price of 1392.26
BOUGHT QTY: 1 on 2020-05-08 00:00:00 at the price of 1416.69
SOLD QTY: -1 on 2020-05-13 00:00:00 at the price of 1379.34
BOUGHT QTY: 1 on 2020-05-19 00:00:00 at the price of 1556.29
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-29 1 1 1816.62 0 0
2019-03-05 -1 0 0 1715 -101.62
2019-04-12 1 1 1827.87 0 0
2019-05-10 -1 0 0 1825 -2.87
2019-06-14 1 1 1808.2 0 0
2019-08-07 -1 0 0 1758.4 -49.8
2019-08-09 1 1 1926.54 0 0
2019-10-08 -1 0 0 1937.05 10.51
2019-10-16 1 1 2016.8 0 0
2019-11-08 -1 0 0 1941 -75.8
2019-12-17 1 1 2000 0 0
2020-01-28 -1 0 0 1914.67 -85.33
2020-05-01 1 1 1442.75 0 0
2020-05-07 -1 0 0 1392.26 -50.49
2020-05-08 1 1 1416.69 0 0
2020-05-13 -1 0 0 1379.34 -37.35
2020-05-19 1 1 1556.29 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-29 -1816.62 1808.8 -7.82 -7.82
2019-03-05 -101.62 0 -101.62 -101.62
2019-04-12 -1929.49 1833.07 -96.42 -96.42
2019-05-10 -104.49 0 -104.49 -104.49
2019-06-14 -1912.69 1775.5 -137.19 -137.19
2019-08-07 -154.29 0 -154.29 -154.29
2019-08-09 -2080.83 1917.69 -163.14 -163.14
2019-10-08 -143.78 0 -143.78 -143.78
2019-10-16 -2160.58 2027.63 -132.95 -132.95
2019-11-08 -219.58 0 -219.58 -219.58
2019-12-17 -2219.58 2001.87 -217.71 -217.71
2020-01-28 -304.91 0 -304.91 -304.91
2020-05-01 -1747.66 1448.79 -298.87 -298.87
2020-05-07 -355.4 0 -355.4 -355.4
2020-05-08 -1772.09 1430.83 -341.26 -341.26
2020-05-13 -392.75 0 -392.75 -392.75
2020-05-19 -1949.04 1547.56 -401.48 -401.48
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $-356.70
The current status of the model is: Holding a position since 2020-05-19 00:00:00
Processing portfolio for model: EMA_010_SlowMA_25_FastMA_20
BOUGHT QTY: 1 on 2019-01-30 00:00:00 at the price of 1825.33
SOLD QTY: -1 on 2019-03-06 00:00:00 at the price of 1748.37
BOUGHT QTY: 1 on 2019-04-15 00:00:00 at the price of 1834.0
SOLD QTY: -1 on 2019-05-10 00:00:00 at the price of 1825.0
BOUGHT QTY: 1 on 2019-05-13 00:00:00 at the price of 1800.0
SOLD QTY: -1 on 2019-05-14 00:00:00 at the price of 1787.12
BOUGHT QTY: 1 on 2019-06-19 00:00:00 at the price of 1812.0
SOLD QTY: -1 on 2019-10-10 00:00:00 at the price of 1942.69
BOUGHT QTY: 1 on 2019-10-15 00:00:00 at the price of 1992.21
SOLD QTY: -1 on 2019-11-11 00:00:00 at the price of 1869.0
BOUGHT QTY: 1 on 2019-12-18 00:00:00 at the price of 2008.67
SOLD QTY: -1 on 2020-01-29 00:00:00 at the price of 1924.04
BOUGHT QTY: 1 on 2020-05-19 00:00:00 at the price of 1556.29
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-30 1 1 1825.33 0 0
2019-03-06 -1 0 0 1748.37 -76.96
2019-04-15 1 1 1834 0 0
2019-05-10 -1 0 0 1825 -9
2019-05-13 1 1 1800 0 0
2019-05-14 -1 0 0 1787.12 -12.88
2019-06-19 1 1 1812 0 0
2019-10-10 -1 0 0 1942.69 130.69
2019-10-15 1 1 1992.21 0 0
2019-11-11 -1 0 0 1869 -123.21
2019-12-18 1 1 2008.67 0 0
2020-01-29 -1 0 0 1924.04 -84.63
2020-05-19 1 1 1556.29 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-30 -1825.33 1818.7 -6.63 -6.63
2019-03-06 -76.96 0 -76.96 -76.96
2019-04-15 -1910.96 1846.23 -64.73 -64.73
2019-05-10 -85.96 0 -85.96 -85.96
2019-05-13 -1885.96 1777.26 -108.7 -108.7
2019-05-14 -98.84 0 -98.84 -98.84
2019-06-19 -1910.84 1842.06 -68.78 -68.78
2019-10-10 31.85 0 31.85 31.85
2019-10-15 -1960.36 2016.39 56.03 56.03
2019-11-11 -91.36 0 -91.36 -91.36
2019-12-18 -2100.03 1991.51 -108.52 -108.52
2020-01-29 -175.99 0 -175.99 -175.99
2020-05-19 -1732.28 1547.56 -184.72 -184.72
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $-139.94
The current status of the model is: Holding a position since 2020-05-19 00:00:00
Processing portfolio for model: EMA_011_SlowMA_30_FastMA_05
BOUGHT QTY: 1 on 2019-01-25 00:00:00 at the price of 1811.99
SOLD QTY: -1 on 2019-03-01 00:00:00 at the price of 1708.2
BOUGHT QTY: 1 on 2019-04-09 00:00:00 at the price of 1776.75
SOLD QTY: -1 on 2019-05-08 00:00:00 at the price of 1765.01
BOUGHT QTY: 1 on 2019-06-11 00:00:00 at the price of 1799.5
SOLD QTY: -1 on 2019-08-06 00:00:00 at the price of 1799.2
BOUGHT QTY: 1 on 2019-08-12 00:00:00 at the price of 1900.44
SOLD QTY: -1 on 2019-09-30 00:00:00 at the price of 1953.0
BOUGHT QTY: 1 on 2019-10-16 00:00:00 at the price of 2016.8
SOLD QTY: -1 on 2019-11-08 00:00:00 at the price of 1941.0
BOUGHT QTY: 1 on 2019-12-13 00:00:00 at the price of 1960.87
SOLD QTY: -1 on 2020-01-24 00:00:00 at the price of 1998.0
BOUGHT QTY: 1 on 2020-02-19 00:00:00 at the price of 1982.76
SOLD QTY: -1 on 2020-02-24 00:00:00 at the price of 1830.93
BOUGHT QTY: 1 on 2020-04-20 00:00:00 at the price of 1462.05
SOLD QTY: -1 on 2020-04-21 00:00:00 at the price of 1382.81
BOUGHT QTY: 1 on 2020-04-30 00:00:00 at the price of 1514.53
SOLD QTY: -1 on 2020-05-07 00:00:00 at the price of 1392.26
BOUGHT QTY: 1 on 2020-05-11 00:00:00 at the price of 1427.02
SOLD QTY: -1 on 2020-05-12 00:00:00 at the price of 1401.09
BOUGHT QTY: 1 on 2020-05-19 00:00:00 at the price of 1556.29
SOLD QTY: -1 on 2020-06-29 00:00:00 at the price of 1567.77
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-25 1 1 1811.99 0 0
2019-03-01 -1 0 0 1708.2 -103.79
2019-04-09 1 1 1776.75 0 0
2019-05-08 -1 0 0 1765.01 -11.74
2019-06-11 1 1 1799.5 0 0
2019-08-06 -1 0 0 1799.2 -0.3
2019-08-12 1 1 1900.44 0 0
2019-09-30 -1 0 0 1953 52.56
2019-10-16 1 1 2016.8 0 0
2019-11-08 -1 0 0 1941 -75.8
2019-12-13 1 1 1960.87 0 0
2020-01-24 -1 0 0 1998 37.13
2020-02-19 1 1 1982.76 0 0
2020-02-24 -1 0 0 1830.93 -151.83
2020-04-20 1 1 1462.05 0 0
2020-04-21 -1 0 0 1382.81 -79.24
2020-04-30 1 1 1514.53 0 0
2020-05-07 -1 0 0 1392.26 -122.27
2020-05-11 1 1 1427.02 0 0
2020-05-12 -1 0 0 1401.09 -25.93
2020-05-19 1 1 1556.29 0 0
2020-06-29 -1 0 0 1567.77 11.48
cash_onhand position_value total_position accumu_return
date
2019-01-25 -1811.99 1802.2 -9.79 -9.79
2019-03-01 -103.79 0 -103.79 -103.79
2019-04-09 -1880.54 1794.47 -86.07 -86.07
2019-05-08 -115.53 0 -115.53 -115.53
2019-06-11 -1915.03 1803.63 -111.4 -111.4
2019-08-06 -115.83 0 -115.83 -115.83
2019-08-12 -2016.27 1916.89 -99.38 -99.38
2019-09-30 -63.27 0 -63.27 -63.27
2019-10-16 -2080.07 2027.63 -52.44 -52.44
2019-11-08 -139.07 0 -139.07 -139.07
2019-12-13 -2099.94 1973.6 -126.34 -126.34
2020-01-24 -101.94 0 -101.94 -101.94
2020-02-19 -2084.7 1968.49 -116.21 -116.21
2020-02-24 -253.77 0 -253.77 -253.77
2020-04-20 -1715.82 1411.63 -304.19 -304.19
2020-04-21 -333.01 0 -333.01 -333.01
2020-04-30 -1847.54 1480.57 -366.97 -366.97
2020-05-07 -455.28 0 -455.28 -455.28
2020-05-11 -1882.3 1411 -471.3 -471.3
2020-05-12 -481.21 0 -481.21 -481.21
2020-05-19 -2037.5 1547.56 -489.94 -489.94
2020-06-29 -469.73 0 -469.73 -469.73
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $-469.73
The current status of the model is: Waiting to enter since 2020-06-29 00:00:00
Processing portfolio for model: EMA_012_SlowMA_30_FastMA_10
BOUGHT QTY: 1 on 2019-01-28 00:00:00 at the price of 1787.62
SOLD QTY: -1 on 2019-03-04 00:00:00 at the price of 1723.66
BOUGHT QTY: 1 on 2019-04-11 00:00:00 at the price of 1810.0
SOLD QTY: -1 on 2019-05-09 00:00:00 at the price of 1729.43
BOUGHT QTY: 1 on 2019-06-13 00:00:00 at the price of 1802.05
SOLD QTY: -1 on 2019-08-07 00:00:00 at the price of 1758.4
BOUGHT QTY: 1 on 2019-08-12 00:00:00 at the price of 1900.44
SOLD QTY: -1 on 2019-10-04 00:00:00 at the price of 1970.64
BOUGHT QTY: 1 on 2019-10-07 00:00:00 at the price of 1971.01
SOLD QTY: -1 on 2019-10-08 00:00:00 at the price of 1937.05
BOUGHT QTY: 1 on 2019-10-16 00:00:00 at the price of 2016.8
SOLD QTY: -1 on 2019-11-08 00:00:00 at the price of 1941.0
BOUGHT QTY: 1 on 2019-12-16 00:00:00 at the price of 1983.47
SOLD QTY: -1 on 2020-01-28 00:00:00 at the price of 1914.67
BOUGHT QTY: 1 on 2020-05-01 00:00:00 at the price of 1442.75
SOLD QTY: -1 on 2020-05-07 00:00:00 at the price of 1392.26
BOUGHT QTY: 1 on 2020-05-11 00:00:00 at the price of 1427.02
SOLD QTY: -1 on 2020-05-12 00:00:00 at the price of 1401.09
BOUGHT QTY: 1 on 2020-05-19 00:00:00 at the price of 1556.29
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-28 1 1 1787.62 0 0
2019-03-04 -1 0 0 1723.66 -63.96
2019-04-11 1 1 1810 0 0
2019-05-09 -1 0 0 1729.43 -80.57
2019-06-13 1 1 1802.05 0 0
2019-08-07 -1 0 0 1758.4 -43.65
2019-08-12 1 1 1900.44 0 0
2019-10-04 -1 0 0 1970.64 70.2
2019-10-07 1 1 1971.01 0 0
2019-10-08 -1 0 0 1937.05 -33.96
2019-10-16 1 1 2016.8 0 0
2019-11-08 -1 0 0 1941 -75.8
2019-12-16 1 1 1983.47 0 0
2020-01-28 -1 0 0 1914.67 -68.8
2020-05-01 1 1 1442.75 0 0
2020-05-07 -1 0 0 1392.26 -50.49
2020-05-11 1 1 1427.02 0 0
2020-05-12 -1 0 0 1401.09 -25.93
2020-05-19 1 1 1556.29 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-28 -1787.62 1813.6 25.98 25.98
2019-03-04 -63.96 0 -63.96 -63.96
2019-04-11 -1873.96 1818.59 -55.37 -55.37
2019-05-09 -144.53 0 -144.53 -144.53
2019-06-13 -1946.58 1809.52 -137.06 -137.06
2019-08-07 -188.18 0 -188.18 -188.18
2019-08-12 -2088.62 1916.89 -171.73 -171.73
2019-10-04 -117.98 0 -117.98 -117.98
2019-10-07 -2088.99 1951.56 -137.43 -137.43
2019-10-08 -151.94 0 -151.94 -151.94
2019-10-16 -2168.74 2027.63 -141.11 -141.11
2019-11-08 -227.74 0 -227.74 -227.74
2019-12-16 -2211.21 1995.02 -216.19 -216.19
2020-01-28 -296.54 0 -296.54 -296.54
2020-05-01 -1739.29 1448.79 -290.5 -290.5
2020-05-07 -347.03 0 -347.03 -347.03
2020-05-11 -1774.05 1411 -363.05 -363.05
2020-05-12 -372.96 0 -372.96 -372.96
2020-05-19 -1929.25 1547.56 -381.69 -381.69
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $-336.91
The current status of the model is: Holding a position since 2020-05-19 00:00:00
Processing portfolio for model: EMA_013_SlowMA_30_FastMA_15
BOUGHT QTY: 1 on 2019-01-30 00:00:00 at the price of 1825.33
SOLD QTY: -1 on 2019-03-06 00:00:00 at the price of 1748.37
BOUGHT QTY: 1 on 2019-04-12 00:00:00 at the price of 1827.87
SOLD QTY: -1 on 2019-05-10 00:00:00 at the price of 1825.0
BOUGHT QTY: 1 on 2019-06-19 00:00:00 at the price of 1812.0
SOLD QTY: -1 on 2019-08-08 00:00:00 at the price of 1900.0
BOUGHT QTY: 1 on 2019-08-09 00:00:00 at the price of 1926.54
SOLD QTY: -1 on 2019-10-10 00:00:00 at the price of 1942.69
BOUGHT QTY: 1 on 2019-10-16 00:00:00 at the price of 2016.8
SOLD QTY: -1 on 2019-11-11 00:00:00 at the price of 1869.0
BOUGHT QTY: 1 on 2019-12-17 00:00:00 at the price of 2000.0
SOLD QTY: -1 on 2020-01-29 00:00:00 at the price of 1924.04
BOUGHT QTY: 1 on 2020-05-19 00:00:00 at the price of 1556.29
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-30 1 1 1825.33 0 0
2019-03-06 -1 0 0 1748.37 -76.96
2019-04-12 1 1 1827.87 0 0
2019-05-10 -1 0 0 1825 -2.87
2019-06-19 1 1 1812 0 0
2019-08-08 -1 0 0 1900 88
2019-08-09 1 1 1926.54 0 0
2019-10-10 -1 0 0 1942.69 16.15
2019-10-16 1 1 2016.8 0 0
2019-11-11 -1 0 0 1869 -147.8
2019-12-17 1 1 2000 0 0
2020-01-29 -1 0 0 1924.04 -75.96
2020-05-19 1 1 1556.29 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-30 -1825.33 1818.7 -6.63 -6.63
2019-03-06 -76.96 0 -76.96 -76.96
2019-04-12 -1904.83 1833.07 -71.76 -71.76
2019-05-10 -79.83 0 -79.83 -79.83
2019-06-19 -1891.83 1842.06 -49.77 -49.77
2019-08-08 8.17 0 8.17 8.17
2019-08-09 -1918.37 1917.69 -0.68 -0.68
2019-10-10 24.32 0 24.32 24.32
2019-10-16 -1992.48 2027.63 35.15 35.15
2019-11-11 -123.48 0 -123.48 -123.48
2019-12-17 -2123.48 2001.87 -121.61 -121.61
2020-01-29 -199.44 0 -199.44 -199.44
2020-05-19 -1755.73 1547.56 -208.17 -208.17
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $-163.39
The current status of the model is: Holding a position since 2020-05-19 00:00:00
Processing portfolio for model: EMA_014_SlowMA_30_FastMA_20
BOUGHT QTY: 1 on 2019-01-31 00:00:00 at the price of 1820.37
SOLD QTY: -1 on 2019-03-07 00:00:00 at the price of 1746.5
BOUGHT QTY: 1 on 2019-04-15 00:00:00 at the price of 1834.0
SOLD QTY: -1 on 2019-05-14 00:00:00 at the price of 1787.12
BOUGHT QTY: 1 on 2019-06-20 00:00:00 at the price of 1862.07
SOLD QTY: -1 on 2019-11-11 00:00:00 at the price of 1869.0
BOUGHT QTY: 1 on 2019-12-18 00:00:00 at the price of 2008.67
SOLD QTY: -1 on 2020-01-30 00:00:00 at the price of 1871.42
BOUGHT QTY: 1 on 2020-05-20 00:00:00 at the price of 1578.52
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-31 1 1 1820.37 0 0
2019-03-07 -1 0 0 1746.5 -73.87
2019-04-15 1 1 1834 0 0
2019-05-14 -1 0 0 1787.12 -46.88
2019-06-20 1 1 1862.07 0 0
2019-11-11 -1 0 0 1869 6.93
2019-12-18 1 1 2008.67 0 0
2020-01-30 -1 0 0 1871.42 -137.25
2020-05-20 1 1 1578.52 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-31 -1820.37 1832.81 12.44 12.44
2019-03-07 -73.87 0 -73.87 -73.87
2019-04-15 -1907.87 1846.23 -61.64 -61.64
2019-05-14 -120.75 0 -120.75 -120.75
2019-06-20 -1982.82 1861.31 -121.51 -121.51
2019-11-11 -113.82 0 -113.82 -113.82
2019-12-18 -2122.49 1991.51 -130.98 -130.98
2020-01-30 -251.07 0 -251.07 -251.07
2020-05-20 -1829.59 1599.15 -230.44 -230.44
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $-237.25
The current status of the model is: Holding a position since 2020-05-20 00:00:00
Processing portfolio for model: EMA_015_SlowMA_35_FastMA_05
BOUGHT QTY: 1 on 2019-01-25 00:00:00 at the price of 1811.99
SOLD QTY: -1 on 2019-03-01 00:00:00 at the price of 1708.2
BOUGHT QTY: 1 on 2019-04-09 00:00:00 at the price of 1776.75
SOLD QTY: -1 on 2019-05-08 00:00:00 at the price of 1765.01
BOUGHT QTY: 1 on 2019-06-12 00:00:00 at the price of 1804.17
SOLD QTY: -1 on 2019-08-06 00:00:00 at the price of 1799.2
BOUGHT QTY: 1 on 2019-08-12 00:00:00 at the price of 1900.44
SOLD QTY: -1 on 2019-10-01 00:00:00 at the price of 1977.0
BOUGHT QTY: 1 on 2019-10-02 00:00:00 at the price of 1969.0
SOLD QTY: -1 on 2019-10-03 00:00:00 at the price of 1936.55
BOUGHT QTY: 1 on 2019-10-15 00:00:00 at the price of 1992.21
SOLD QTY: -1 on 2019-11-08 00:00:00 at the price of 1941.0
BOUGHT QTY: 1 on 2019-12-13 00:00:00 at the price of 1960.87
SOLD QTY: -1 on 2020-01-24 00:00:00 at the price of 1998.0
BOUGHT QTY: 1 on 2020-02-19 00:00:00 at the price of 1982.76
SOLD QTY: -1 on 2020-02-24 00:00:00 at the price of 1830.93
BOUGHT QTY: 1 on 2020-04-30 00:00:00 at the price of 1514.53
SOLD QTY: -1 on 2020-05-06 00:00:00 at the price of 1397.46
BOUGHT QTY: 1 on 2020-05-19 00:00:00 at the price of 1556.29
SOLD QTY: -1 on 2020-06-29 00:00:00 at the price of 1567.77
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-25 1 1 1811.99 0 0
2019-03-01 -1 0 0 1708.2 -103.79
2019-04-09 1 1 1776.75 0 0
2019-05-08 -1 0 0 1765.01 -11.74
2019-06-12 1 1 1804.17 0 0
2019-08-06 -1 0 0 1799.2 -4.97
2019-08-12 1 1 1900.44 0 0
2019-10-01 -1 0 0 1977 76.56
2019-10-02 1 1 1969 0 0
2019-10-03 -1 0 0 1936.55 -32.45
2019-10-15 1 1 1992.21 0 0
2019-11-08 -1 0 0 1941 -51.21
2019-12-13 1 1 1960.87 0 0
2020-01-24 -1 0 0 1998 37.13
2020-02-19 1 1 1982.76 0 0
2020-02-24 -1 0 0 1830.93 -151.83
2020-04-30 1 1 1514.53 0 0
2020-05-06 -1 0 0 1397.46 -117.07
2020-05-19 1 1 1556.29 0 0
2020-06-29 -1 0 0 1567.77 11.48
cash_onhand position_value total_position accumu_return
date
2019-01-25 -1811.99 1802.2 -9.79 -9.79
2019-03-01 -103.79 0 -103.79 -103.79
2019-04-09 -1880.54 1794.47 -86.07 -86.07
2019-05-08 -115.53 0 -115.53 -115.53
2019-06-12 -1919.7 1798.9 -120.8 -120.8
2019-08-06 -120.5 0 -120.5 -120.5
2019-08-12 -2020.94 1916.89 -104.05 -104.05
2019-10-01 -43.94 0 -43.94 -43.94
2019-10-02 -2012.94 1941.44 -71.5 -71.5
2019-10-03 -76.39 0 -76.39 -76.39
2019-10-15 -2068.6 2016.39 -52.21 -52.21
2019-11-08 -127.6 0 -127.6 -127.6
2019-12-13 -2088.47 1973.6 -114.87 -114.87
2020-01-24 -90.47 0 -90.47 -90.47
2020-02-19 -2073.23 1968.49 -104.74 -104.74
2020-02-24 -242.3 0 -242.3 -242.3
2020-04-30 -1756.83 1480.57 -276.26 -276.26
2020-05-06 -359.37 0 -359.37 -359.37
2020-05-19 -1915.66 1547.56 -368.1 -368.1
2020-06-29 -347.89 0 -347.89 -347.89
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $-347.89
The current status of the model is: Waiting to enter since 2020-06-29 00:00:00
Processing portfolio for model: EMA_016_SlowMA_35_FastMA_10
BOUGHT QTY: 1 on 2019-01-29 00:00:00 at the price of 1816.62
SOLD QTY: -1 on 2019-03-05 00:00:00 at the price of 1715.0
BOUGHT QTY: 1 on 2019-04-11 00:00:00 at the price of 1810.0
SOLD QTY: -1 on 2019-05-09 00:00:00 at the price of 1729.43
BOUGHT QTY: 1 on 2019-06-14 00:00:00 at the price of 1808.2
SOLD QTY: -1 on 2019-08-07 00:00:00 at the price of 1758.4
BOUGHT QTY: 1 on 2019-08-09 00:00:00 at the price of 1926.54
SOLD QTY: -1 on 2019-10-09 00:00:00 at the price of 1953.72
BOUGHT QTY: 1 on 2019-10-16 00:00:00 at the price of 2016.8
SOLD QTY: -1 on 2019-11-08 00:00:00 at the price of 1941.0
BOUGHT QTY: 1 on 2019-12-17 00:00:00 at the price of 2000.0
SOLD QTY: -1 on 2020-01-28 00:00:00 at the price of 1914.67
BOUGHT QTY: 1 on 2020-05-20 00:00:00 at the price of 1578.52
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-29 1 1 1816.62 0 0
2019-03-05 -1 0 0 1715 -101.62
2019-04-11 1 1 1810 0 0
2019-05-09 -1 0 0 1729.43 -80.57
2019-06-14 1 1 1808.2 0 0
2019-08-07 -1 0 0 1758.4 -49.8
2019-08-09 1 1 1926.54 0 0
2019-10-09 -1 0 0 1953.72 27.18
2019-10-16 1 1 2016.8 0 0
2019-11-08 -1 0 0 1941 -75.8
2019-12-17 1 1 2000 0 0
2020-01-28 -1 0 0 1914.67 -85.33
2020-05-20 1 1 1578.52 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-29 -1816.62 1808.8 -7.82 -7.82
2019-03-05 -101.62 0 -101.62 -101.62
2019-04-11 -1911.62 1818.59 -93.03 -93.03
2019-05-09 -182.19 0 -182.19 -182.19
2019-06-14 -1990.39 1775.5 -214.89 -214.89
2019-08-07 -231.99 0 -231.99 -231.99
2019-08-09 -2158.53 1917.69 -240.84 -240.84
2019-10-09 -204.81 0 -204.81 -204.81
2019-10-16 -2221.61 2027.63 -193.98 -193.98
2019-11-08 -280.61 0 -280.61 -280.61
2019-12-17 -2280.61 2001.87 -278.74 -278.74
2020-01-28 -365.94 0 -365.94 -365.94
2020-05-20 -1944.46 1599.15 -345.31 -345.31
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $-352.12
The current status of the model is: Holding a position since 2020-05-20 00:00:00
Processing portfolio for model: EMA_017_SlowMA_35_FastMA_15
BOUGHT QTY: 1 on 2019-01-30 00:00:00 at the price of 1825.33
SOLD QTY: -1 on 2019-03-06 00:00:00 at the price of 1748.37
BOUGHT QTY: 1 on 2019-04-15 00:00:00 at the price of 1834.0
SOLD QTY: -1 on 2019-05-10 00:00:00 at the price of 1825.0
BOUGHT QTY: 1 on 2019-05-13 00:00:00 at the price of 1800.0
SOLD QTY: -1 on 2019-05-14 00:00:00 at the price of 1787.12
BOUGHT QTY: 1 on 2019-06-19 00:00:00 at the price of 1812.0
SOLD QTY: -1 on 2019-11-11 00:00:00 at the price of 1869.0
BOUGHT QTY: 1 on 2019-12-18 00:00:00 at the price of 2008.67
SOLD QTY: -1 on 2020-01-29 00:00:00 at the price of 1924.04
BOUGHT QTY: 1 on 2020-05-20 00:00:00 at the price of 1578.52
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-30 1 1 1825.33 0 0
2019-03-06 -1 0 0 1748.37 -76.96
2019-04-15 1 1 1834 0 0
2019-05-10 -1 0 0 1825 -9
2019-05-13 1 1 1800 0 0
2019-05-14 -1 0 0 1787.12 -12.88
2019-06-19 1 1 1812 0 0
2019-11-11 -1 0 0 1869 57
2019-12-18 1 1 2008.67 0 0
2020-01-29 -1 0 0 1924.04 -84.63
2020-05-20 1 1 1578.52 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-30 -1825.33 1818.7 -6.63 -6.63
2019-03-06 -76.96 0 -76.96 -76.96
2019-04-15 -1910.96 1846.23 -64.73 -64.73
2019-05-10 -85.96 0 -85.96 -85.96
2019-05-13 -1885.96 1777.26 -108.7 -108.7
2019-05-14 -98.84 0 -98.84 -98.84
2019-06-19 -1910.84 1842.06 -68.78 -68.78
2019-11-11 -41.84 0 -41.84 -41.84
2019-12-18 -2050.51 1991.51 -59 -59
2020-01-29 -126.47 0 -126.47 -126.47
2020-05-20 -1704.99 1599.15 -105.84 -105.84
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $-112.65
The current status of the model is: Holding a position since 2020-05-20 00:00:00
Processing portfolio for model: EMA_018_SlowMA_35_FastMA_20
BOUGHT QTY: 1 on 2019-02-01 00:00:00 at the price of 1824.05
SOLD QTY: -1 on 2019-03-08 00:00:00 at the price of 1708.04
BOUGHT QTY: 1 on 2019-04-15 00:00:00 at the price of 1834.0
SOLD QTY: -1 on 2019-05-15 00:00:00 at the price of 1778.6
BOUGHT QTY: 1 on 2019-06-20 00:00:00 at the price of 1862.07
SOLD QTY: -1 on 2019-11-11 00:00:00 at the price of 1869.0
BOUGHT QTY: 1 on 2019-12-19 00:00:00 at the price of 1996.0
SOLD QTY: -1 on 2020-01-30 00:00:00 at the price of 1871.42
BOUGHT QTY: 1 on 2020-05-21 00:00:00 at the price of 1605.0
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-02-01 1 1 1824.05 0 0
2019-03-08 -1 0 0 1708.04 -116.01
2019-04-15 1 1 1834 0 0
2019-05-15 -1 0 0 1778.6 -55.4
2019-06-20 1 1 1862.07 0 0
2019-11-11 -1 0 0 1869 6.93
2019-12-19 1 1 1996 0 0
2020-01-30 -1 0 0 1871.42 -124.58
2020-05-21 1 1 1605 0 0
cash_onhand position_value total_position accumu_return
date
2019-02-01 -1824.05 1836.96 12.91 12.91
2019-03-08 -116.01 0 -116.01 -116.01
2019-04-15 -1950.01 1846.23 -103.78 -103.78
2019-05-15 -171.41 0 -171.41 -171.41
2019-06-20 -2033.48 1861.31 -172.17 -172.17
2019-11-11 -164.48 0 -164.48 -164.48
2019-12-19 -2160.48 2003.12 -157.36 -157.36
2020-01-30 -289.06 0 -289.06 -289.06
2020-05-21 -1894.06 1595.68 -298.38 -298.38
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $-301.72
The current status of the model is: Holding a position since 2020-05-21 00:00:00
Processing portfolio for model: EMA_019_SlowMA_40_FastMA_05
BOUGHT QTY: 1 on 2019-01-25 00:00:00 at the price of 1811.99
SOLD QTY: -1 on 2019-03-01 00:00:00 at the price of 1708.2
BOUGHT QTY: 1 on 2019-04-10 00:00:00 at the price of 1793.85
SOLD QTY: -1 on 2019-05-08 00:00:00 at the price of 1765.01
BOUGHT QTY: 1 on 2019-06-12 00:00:00 at the price of 1804.17
SOLD QTY: -1 on 2019-08-06 00:00:00 at the price of 1799.2
BOUGHT QTY: 1 on 2019-08-09 00:00:00 at the price of 1926.54
SOLD QTY: -1 on 2019-10-03 00:00:00 at the price of 1936.55
BOUGHT QTY: 1 on 2019-10-07 00:00:00 at the price of 1971.01
SOLD QTY: -1 on 2019-10-08 00:00:00 at the price of 1937.05
BOUGHT QTY: 1 on 2019-10-15 00:00:00 at the price of 1992.21
SOLD QTY: -1 on 2019-11-08 00:00:00 at the price of 1941.0
BOUGHT QTY: 1 on 2019-12-16 00:00:00 at the price of 1983.47
SOLD QTY: -1 on 2020-01-27 00:00:00 at the price of 1906.41
BOUGHT QTY: 1 on 2020-02-19 00:00:00 at the price of 1982.76
SOLD QTY: -1 on 2020-02-24 00:00:00 at the price of 1830.93
BOUGHT QTY: 1 on 2020-05-01 00:00:00 at the price of 1442.75
SOLD QTY: -1 on 2020-05-05 00:00:00 at the price of 1443.25
BOUGHT QTY: 1 on 2020-05-19 00:00:00 at the price of 1556.29
SOLD QTY: -1 on 2020-06-29 00:00:00 at the price of 1567.77
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-25 1 1 1811.99 0 0
2019-03-01 -1 0 0 1708.2 -103.79
2019-04-10 1 1 1793.85 0 0
2019-05-08 -1 0 0 1765.01 -28.84
2019-06-12 1 1 1804.17 0 0
2019-08-06 -1 0 0 1799.2 -4.97
2019-08-09 1 1 1926.54 0 0
2019-10-03 -1 0 0 1936.55 10.01
2019-10-07 1 1 1971.01 0 0
2019-10-08 -1 0 0 1937.05 -33.96
2019-10-15 1 1 1992.21 0 0
2019-11-08 -1 0 0 1941 -51.21
2019-12-16 1 1 1983.47 0 0
2020-01-27 -1 0 0 1906.41 -77.06
2020-02-19 1 1 1982.76 0 0
2020-02-24 -1 0 0 1830.93 -151.83
2020-05-01 1 1 1442.75 0 0
2020-05-05 -1 0 0 1443.25 0.5
2020-05-19 1 1 1556.29 0 0
2020-06-29 -1 0 0 1567.77 11.48
cash_onhand position_value total_position accumu_return
date
2019-01-25 -1811.99 1802.2 -9.79 -9.79
2019-03-01 -103.79 0 -103.79 -103.79
2019-04-10 -1897.64 1806 -91.64 -91.64
2019-05-08 -132.63 0 -132.63 -132.63
2019-06-12 -1936.8 1798.9 -137.9 -137.9
2019-08-06 -137.6 0 -137.6 -137.6
2019-08-09 -2064.14 1917.69 -146.45 -146.45
2019-10-03 -127.59 0 -127.59 -127.59
2019-10-07 -2098.6 1951.56 -147.04 -147.04
2019-10-08 -161.55 0 -161.55 -161.55
2019-10-15 -2153.76 2016.39 -137.37 -137.37
2019-11-08 -212.76 0 -212.76 -212.76
2019-12-16 -2196.23 1995.02 -201.21 -201.21
2020-01-27 -289.82 0 -289.82 -289.82
2020-02-19 -2272.58 1968.49 -304.09 -304.09
2020-02-24 -441.65 0 -441.65 -441.65
2020-05-01 -1884.4 1448.79 -435.61 -435.61
2020-05-05 -441.15 0 -441.15 -441.15
2020-05-19 -1997.44 1547.56 -449.88 -449.88
2020-06-29 -429.67 0 -429.67 -429.67
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $-429.67
The current status of the model is: Waiting to enter since 2020-06-29 00:00:00
Processing portfolio for model: EMA_020_SlowMA_40_FastMA_10
BOUGHT QTY: 1 on 2019-01-29 00:00:00 at the price of 1816.62
SOLD QTY: -1 on 2019-03-05 00:00:00 at the price of 1715.0
BOUGHT QTY: 1 on 2019-04-12 00:00:00 at the price of 1827.87
SOLD QTY: -1 on 2019-05-09 00:00:00 at the price of 1729.43
BOUGHT QTY: 1 on 2019-06-14 00:00:00 at the price of 1808.2
SOLD QTY: -1 on 2019-08-07 00:00:00 at the price of 1758.4
BOUGHT QTY: 1 on 2019-08-09 00:00:00 at the price of 1926.54
SOLD QTY: -1 on 2019-10-10 00:00:00 at the price of 1942.69
BOUGHT QTY: 1 on 2019-10-15 00:00:00 at the price of 1992.21
SOLD QTY: -1 on 2019-11-08 00:00:00 at the price of 1941.0
BOUGHT QTY: 1 on 2019-12-17 00:00:00 at the price of 2000.0
SOLD QTY: -1 on 2020-01-28 00:00:00 at the price of 1914.67
BOUGHT QTY: 1 on 2020-05-20 00:00:00 at the price of 1578.52
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-29 1 1 1816.62 0 0
2019-03-05 -1 0 0 1715 -101.62
2019-04-12 1 1 1827.87 0 0
2019-05-09 -1 0 0 1729.43 -98.44
2019-06-14 1 1 1808.2 0 0
2019-08-07 -1 0 0 1758.4 -49.8
2019-08-09 1 1 1926.54 0 0
2019-10-10 -1 0 0 1942.69 16.15
2019-10-15 1 1 1992.21 0 0
2019-11-08 -1 0 0 1941 -51.21
2019-12-17 1 1 2000 0 0
2020-01-28 -1 0 0 1914.67 -85.33
2020-05-20 1 1 1578.52 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-29 -1816.62 1808.8 -7.82 -7.82
2019-03-05 -101.62 0 -101.62 -101.62
2019-04-12 -1929.49 1833.07 -96.42 -96.42
2019-05-09 -200.06 0 -200.06 -200.06
2019-06-14 -2008.26 1775.5 -232.76 -232.76
2019-08-07 -249.86 0 -249.86 -249.86
2019-08-09 -2176.4 1917.69 -258.71 -258.71
2019-10-10 -233.71 0 -233.71 -233.71
2019-10-15 -2225.92 2016.39 -209.53 -209.53
2019-11-08 -284.92 0 -284.92 -284.92
2019-12-17 -2284.92 2001.87 -283.05 -283.05
2020-01-28 -370.25 0 -370.25 -370.25
2020-05-20 -1948.77 1599.15 -349.62 -349.62
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $-356.43
The current status of the model is: Holding a position since 2020-05-20 00:00:00
Processing portfolio for model: EMA_021_SlowMA_40_FastMA_15
BOUGHT QTY: 1 on 2019-01-31 00:00:00 at the price of 1820.37
SOLD QTY: -1 on 2019-03-06 00:00:00 at the price of 1748.37
BOUGHT QTY: 1 on 2019-04-15 00:00:00 at the price of 1834.0
SOLD QTY: -1 on 2019-05-10 00:00:00 at the price of 1825.0
BOUGHT QTY: 1 on 2019-05-13 00:00:00 at the price of 1800.0
SOLD QTY: -1 on 2019-05-14 00:00:00 at the price of 1787.12
BOUGHT QTY: 1 on 2019-06-20 00:00:00 at the price of 1862.07
SOLD QTY: -1 on 2019-11-11 00:00:00 at the price of 1869.0
BOUGHT QTY: 1 on 2019-12-18 00:00:00 at the price of 2008.67
SOLD QTY: -1 on 2020-01-29 00:00:00 at the price of 1924.04
BOUGHT QTY: 1 on 2020-05-21 00:00:00 at the price of 1605.0
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-31 1 1 1820.37 0 0
2019-03-06 -1 0 0 1748.37 -72
2019-04-15 1 1 1834 0 0
2019-05-10 -1 0 0 1825 -9
2019-05-13 1 1 1800 0 0
2019-05-14 -1 0 0 1787.12 -12.88
2019-06-20 1 1 1862.07 0 0
2019-11-11 -1 0 0 1869 6.93
2019-12-18 1 1 2008.67 0 0
2020-01-29 -1 0 0 1924.04 -84.63
2020-05-21 1 1 1605 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-31 -1820.37 1832.81 12.44 12.44
2019-03-06 -72 0 -72 -72
2019-04-15 -1906 1846.23 -59.77 -59.77
2019-05-10 -81 0 -81 -81
2019-05-13 -1881 1777.26 -103.74 -103.74
2019-05-14 -93.88 0 -93.88 -93.88
2019-06-20 -1955.95 1861.31 -94.64 -94.64
2019-11-11 -86.95 0 -86.95 -86.95
2019-12-18 -2095.62 1991.51 -104.11 -104.11
2020-01-29 -171.58 0 -171.58 -171.58
2020-05-21 -1776.58 1595.68 -180.9 -180.9
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $-184.24
The current status of the model is: Holding a position since 2020-05-21 00:00:00
Processing portfolio for model: EMA_022_SlowMA_40_FastMA_20
BOUGHT QTY: 1 on 2019-02-01 00:00:00 at the price of 1824.05
SOLD QTY: -1 on 2019-03-08 00:00:00 at the price of 1708.04
BOUGHT QTY: 1 on 2019-04-16 00:00:00 at the price of 1851.8
SOLD QTY: -1 on 2019-05-16 00:00:00 at the price of 1790.0
BOUGHT QTY: 1 on 2019-06-20 00:00:00 at the price of 1862.07
SOLD QTY: -1 on 2019-11-12 00:00:00 at the price of 1901.35
BOUGHT QTY: 1 on 2019-12-19 00:00:00 at the price of 1996.0
SOLD QTY: -1 on 2020-01-30 00:00:00 at the price of 1871.42
BOUGHT QTY: 1 on 2020-05-22 00:00:00 at the price of 1591.74
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-02-01 1 1 1824.05 0 0
2019-03-08 -1 0 0 1708.04 -116.01
2019-04-16 1 1 1851.8 0 0
2019-05-16 -1 0 0 1790 -61.8
2019-06-20 1 1 1862.07 0 0
2019-11-12 -1 0 0 1901.35 39.28
2019-12-19 1 1 1996 0 0
2020-01-30 -1 0 0 1871.42 -124.58
2020-05-22 1 1 1591.74 0 0
cash_onhand position_value total_position accumu_return
date
2019-02-01 -1824.05 1836.96 12.91 12.91
2019-03-08 -116.01 0 -116.01 -116.01
2019-04-16 -1967.81 1841.7 -126.11 -126.11
2019-05-16 -177.81 0 -177.81 -177.81
2019-06-20 -2039.88 1861.31 -178.57 -178.57
2019-11-12 -138.53 0 -138.53 -138.53
2019-12-19 -2134.53 2003.12 -131.41 -131.41
2020-01-30 -263.11 0 -263.11 -263.11
2020-05-22 -1854.85 1631.3 -223.55 -223.55
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $-262.51
The current status of the model is: Holding a position since 2020-05-22 00:00:00
Processing portfolio for model: EMA_023_SlowMA_45_FastMA_05
BOUGHT QTY: 1 on 2019-01-25 00:00:00 at the price of 1811.99
SOLD QTY: -1 on 2019-03-04 00:00:00 at the price of 1723.66
BOUGHT QTY: 1 on 2019-04-10 00:00:00 at the price of 1793.85
SOLD QTY: -1 on 2019-05-08 00:00:00 at the price of 1765.01
BOUGHT QTY: 1 on 2019-06-12 00:00:00 at the price of 1804.17
SOLD QTY: -1 on 2019-08-06 00:00:00 at the price of 1799.2
BOUGHT QTY: 1 on 2019-08-09 00:00:00 at the price of 1926.54
SOLD QTY: -1 on 2019-10-09 00:00:00 at the price of 1953.72
BOUGHT QTY: 1 on 2019-10-14 00:00:00 at the price of 1964.52
SOLD QTY: -1 on 2019-11-08 00:00:00 at the price of 1941.0
BOUGHT QTY: 1 on 2019-12-16 00:00:00 at the price of 1983.47
SOLD QTY: -1 on 2020-01-27 00:00:00 at the price of 1906.41
BOUGHT QTY: 1 on 2020-02-20 00:00:00 at the price of 1960.0
SOLD QTY: -1 on 2020-02-24 00:00:00 at the price of 1830.93
BOUGHT QTY: 1 on 2020-05-20 00:00:00 at the price of 1578.52
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-25 1 1 1811.99 0 0
2019-03-04 -1 0 0 1723.66 -88.33
2019-04-10 1 1 1793.85 0 0
2019-05-08 -1 0 0 1765.01 -28.84
2019-06-12 1 1 1804.17 0 0
2019-08-06 -1 0 0 1799.2 -4.97
2019-08-09 1 1 1926.54 0 0
2019-10-09 -1 0 0 1953.72 27.18
2019-10-14 1 1 1964.52 0 0
2019-11-08 -1 0 0 1941 -23.52
2019-12-16 1 1 1983.47 0 0
2020-01-27 -1 0 0 1906.41 -77.06
2020-02-20 1 1 1960 0 0
2020-02-24 -1 0 0 1830.93 -129.07
2020-05-20 1 1 1578.52 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-25 -1811.99 1802.2 -9.79 -9.79
2019-03-04 -88.33 0 -88.33 -88.33
2019-04-10 -1882.18 1806 -76.18 -76.18
2019-05-08 -117.17 0 -117.17 -117.17
2019-06-12 -1921.34 1798.9 -122.44 -122.44
2019-08-06 -122.14 0 -122.14 -122.14
2019-08-09 -2048.68 1917.69 -130.99 -130.99
2019-10-09 -94.96 0 -94.96 -94.96
2019-10-14 -2059.48 1988.75 -70.73 -70.73
2019-11-08 -118.48 0 -118.48 -118.48
2019-12-16 -2101.95 1995.02 -106.93 -106.93
2020-01-27 -195.54 0 -195.54 -195.54
2020-02-20 -2155.54 1970.91 -184.63 -184.63
2020-02-24 -324.61 0 -324.61 -324.61
2020-05-20 -1903.13 1599.15 -303.98 -303.98
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $-310.79
The current status of the model is: Holding a position since 2020-05-20 00:00:00
Processing portfolio for model: EMA_024_SlowMA_45_FastMA_10
BOUGHT QTY: 1 on 2019-01-29 00:00:00 at the price of 1816.62
SOLD QTY: -1 on 2019-03-05 00:00:00 at the price of 1715.0
BOUGHT QTY: 1 on 2019-04-12 00:00:00 at the price of 1827.87
SOLD QTY: -1 on 2019-05-10 00:00:00 at the price of 1825.0
BOUGHT QTY: 1 on 2019-06-17 00:00:00 at the price of 1776.0
SOLD QTY: -1 on 2019-08-08 00:00:00 at the price of 1900.0
BOUGHT QTY: 1 on 2019-08-09 00:00:00 at the price of 1926.54
SOLD QTY: -1 on 2019-11-11 00:00:00 at the price of 1869.0
BOUGHT QTY: 1 on 2019-12-17 00:00:00 at the price of 2000.0
SOLD QTY: -1 on 2020-01-28 00:00:00 at the price of 1914.67
BOUGHT QTY: 1 on 2020-05-21 00:00:00 at the price of 1605.0
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-29 1 1 1816.62 0 0
2019-03-05 -1 0 0 1715 -101.62
2019-04-12 1 1 1827.87 0 0
2019-05-10 -1 0 0 1825 -2.87
2019-06-17 1 1 1776 0 0
2019-08-08 -1 0 0 1900 124
2019-08-09 1 1 1926.54 0 0
2019-11-11 -1 0 0 1869 -57.54
2019-12-17 1 1 2000 0 0
2020-01-28 -1 0 0 1914.67 -85.33
2020-05-21 1 1 1605 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-29 -1816.62 1808.8 -7.82 -7.82
2019-03-05 -101.62 0 -101.62 -101.62
2019-04-12 -1929.49 1833.07 -96.42 -96.42
2019-05-10 -104.49 0 -104.49 -104.49
2019-06-17 -1880.49 1781.41 -99.08 -99.08
2019-08-08 19.51 0 19.51 19.51
2019-08-09 -1907.03 1917.69 10.66 10.66
2019-11-11 -38.03 0 -38.03 -38.03
2019-12-17 -2038.03 2001.87 -36.16 -36.16
2020-01-28 -123.36 0 -123.36 -123.36
2020-05-21 -1728.36 1595.68 -132.68 -132.68
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $-136.02
The current status of the model is: Holding a position since 2020-05-21 00:00:00
Processing portfolio for model: EMA_025_SlowMA_45_FastMA_15
BOUGHT QTY: 1 on 2019-01-31 00:00:00 at the price of 1820.37
SOLD QTY: -1 on 2019-03-07 00:00:00 at the price of 1746.5
BOUGHT QTY: 1 on 2019-04-15 00:00:00 at the price of 1834.0
SOLD QTY: -1 on 2019-05-14 00:00:00 at the price of 1787.12
BOUGHT QTY: 1 on 2019-06-20 00:00:00 at the price of 1862.07
SOLD QTY: -1 on 2019-11-11 00:00:00 at the price of 1869.0
BOUGHT QTY: 1 on 2019-12-18 00:00:00 at the price of 2008.67
SOLD QTY: -1 on 2020-01-30 00:00:00 at the price of 1871.42
BOUGHT QTY: 1 on 2020-05-22 00:00:00 at the price of 1591.74
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-31 1 1 1820.37 0 0
2019-03-07 -1 0 0 1746.5 -73.87
2019-04-15 1 1 1834 0 0
2019-05-14 -1 0 0 1787.12 -46.88
2019-06-20 1 1 1862.07 0 0
2019-11-11 -1 0 0 1869 6.93
2019-12-18 1 1 2008.67 0 0
2020-01-30 -1 0 0 1871.42 -137.25
2020-05-22 1 1 1591.74 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-31 -1820.37 1832.81 12.44 12.44
2019-03-07 -73.87 0 -73.87 -73.87
2019-04-15 -1907.87 1846.23 -61.64 -61.64
2019-05-14 -120.75 0 -120.75 -120.75
2019-06-20 -1982.82 1861.31 -121.51 -121.51
2019-11-11 -113.82 0 -113.82 -113.82
2019-12-18 -2122.49 1991.51 -130.98 -130.98
2020-01-30 -251.07 0 -251.07 -251.07
2020-05-22 -1842.81 1631.3 -211.51 -211.51
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $-250.47
The current status of the model is: Holding a position since 2020-05-22 00:00:00
Processing portfolio for model: EMA_026_SlowMA_45_FastMA_20
BOUGHT QTY: 1 on 2019-02-04 00:00:00 at the price of 1840.39
SOLD QTY: -1 on 2019-03-08 00:00:00 at the price of 1708.04
BOUGHT QTY: 1 on 2019-04-16 00:00:00 at the price of 1851.8
SOLD QTY: -1 on 2019-05-20 00:00:00 at the price of 1769.73
BOUGHT QTY: 1 on 2019-06-21 00:00:00 at the price of 1859.36
SOLD QTY: -1 on 2019-11-12 00:00:00 at the price of 1901.35
BOUGHT QTY: 1 on 2019-12-20 00:00:00 at the price of 2017.0
SOLD QTY: -1 on 2020-01-31 00:00:00 at the price of 1865.93
BOUGHT QTY: 1 on 2020-05-26 00:00:00 at the price of 1704.32
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-02-04 1 1 1840.39 0 0
2019-03-08 -1 0 0 1708.04 -132.35
2019-04-16 1 1 1851.8 0 0
2019-05-20 -1 0 0 1769.73 -82.07
2019-06-21 1 1 1859.36 0 0
2019-11-12 -1 0 0 1901.35 41.99
2019-12-20 1 1 2017 0 0
2020-01-31 -1 0 0 1865.93 -151.07
2020-05-26 1 1 1704.32 0 0
cash_onhand position_value total_position accumu_return
date
2019-02-04 -1840.39 1860.99 20.6 20.6
2019-03-08 -132.35 0 -132.35 -132.35
2019-04-16 -1984.15 1841.7 -142.45 -142.45
2019-05-20 -214.42 0 -214.42 -214.42
2019-06-21 -2073.78 1880 -193.78 -193.78
2019-11-12 -172.43 0 -172.43 -172.43
2019-12-20 -2189.43 2023.26 -166.17 -166.17
2020-01-31 -323.5 0 -323.5 -323.5
2020-05-26 -2027.82 1746.91 -280.91 -280.91
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $-435.48
The current status of the model is: Holding a position since 2020-05-26 00:00:00
Processing portfolio for model: EMA_027_SlowMA_50_FastMA_05
BOUGHT QTY: 1 on 2019-01-28 00:00:00 at the price of 1787.62
SOLD QTY: -1 on 2019-03-04 00:00:00 at the price of 1723.66
BOUGHT QTY: 1 on 2019-04-10 00:00:00 at the price of 1793.85
SOLD QTY: -1 on 2019-05-08 00:00:00 at the price of 1765.01
BOUGHT QTY: 1 on 2019-06-12 00:00:00 at the price of 1804.17
SOLD QTY: -1 on 2019-08-06 00:00:00 at the price of 1799.2
BOUGHT QTY: 1 on 2019-08-09 00:00:00 at the price of 1926.54
SOLD QTY: -1 on 2019-10-09 00:00:00 at the price of 1953.72
BOUGHT QTY: 1 on 2019-10-14 00:00:00 at the price of 1964.52
SOLD QTY: -1 on 2019-11-08 00:00:00 at the price of 1941.0
BOUGHT QTY: 1 on 2019-12-16 00:00:00 at the price of 1983.47
SOLD QTY: -1 on 2020-01-27 00:00:00 at the price of 1906.41
BOUGHT QTY: 1 on 2020-02-20 00:00:00 at the price of 1960.0
SOLD QTY: -1 on 2020-02-24 00:00:00 at the price of 1830.93
BOUGHT QTY: 1 on 2020-05-20 00:00:00 at the price of 1578.52
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-28 1 1 1787.62 0 0
2019-03-04 -1 0 0 1723.66 -63.96
2019-04-10 1 1 1793.85 0 0
2019-05-08 -1 0 0 1765.01 -28.84
2019-06-12 1 1 1804.17 0 0
2019-08-06 -1 0 0 1799.2 -4.97
2019-08-09 1 1 1926.54 0 0
2019-10-09 -1 0 0 1953.72 27.18
2019-10-14 1 1 1964.52 0 0
2019-11-08 -1 0 0 1941 -23.52
2019-12-16 1 1 1983.47 0 0
2020-01-27 -1 0 0 1906.41 -77.06
2020-02-20 1 1 1960 0 0
2020-02-24 -1 0 0 1830.93 -129.07
2020-05-20 1 1 1578.52 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-28 -1787.62 1813.6 25.98 25.98
2019-03-04 -63.96 0 -63.96 -63.96
2019-04-10 -1857.81 1806 -51.81 -51.81
2019-05-08 -92.8 0 -92.8 -92.8
2019-06-12 -1896.97 1798.9 -98.07 -98.07
2019-08-06 -97.77 0 -97.77 -97.77
2019-08-09 -2024.31 1917.69 -106.62 -106.62
2019-10-09 -70.59 0 -70.59 -70.59
2019-10-14 -2035.11 1988.75 -46.36 -46.36
2019-11-08 -94.11 0 -94.11 -94.11
2019-12-16 -2077.58 1995.02 -82.56 -82.56
2020-01-27 -171.17 0 -171.17 -171.17
2020-02-20 -2131.17 1970.91 -160.26 -160.26
2020-02-24 -300.24 0 -300.24 -300.24
2020-05-20 -1878.76 1599.15 -279.61 -279.61
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $-286.42
The current status of the model is: Holding a position since 2020-05-20 00:00:00
Processing portfolio for model: EMA_028_SlowMA_50_FastMA_10
BOUGHT QTY: 1 on 2019-01-30 00:00:00 at the price of 1825.33
SOLD QTY: -1 on 2019-03-05 00:00:00 at the price of 1715.0
BOUGHT QTY: 1 on 2019-04-12 00:00:00 at the price of 1827.87
SOLD QTY: -1 on 2019-05-10 00:00:00 at the price of 1825.0
BOUGHT QTY: 1 on 2019-06-18 00:00:00 at the price of 1808.38
SOLD QTY: -1 on 2019-08-08 00:00:00 at the price of 1900.0
BOUGHT QTY: 1 on 2019-08-09 00:00:00 at the price of 1926.54
SOLD QTY: -1 on 2019-11-11 00:00:00 at the price of 1869.0
BOUGHT QTY: 1 on 2019-12-17 00:00:00 at the price of 2000.0
SOLD QTY: -1 on 2020-01-28 00:00:00 at the price of 1914.67
BOUGHT QTY: 1 on 2020-05-21 00:00:00 at the price of 1605.0
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-30 1 1 1825.33 0 0
2019-03-05 -1 0 0 1715 -110.33
2019-04-12 1 1 1827.87 0 0
2019-05-10 -1 0 0 1825 -2.87
2019-06-18 1 1 1808.38 0 0
2019-08-08 -1 0 0 1900 91.62
2019-08-09 1 1 1926.54 0 0
2019-11-11 -1 0 0 1869 -57.54
2019-12-17 1 1 2000 0 0
2020-01-28 -1 0 0 1914.67 -85.33
2020-05-21 1 1 1605 0 0
cash_onhand position_value total_position accumu_return
date
2019-01-30 -1825.33 1818.7 -6.63 -6.63
2019-03-05 -110.33 0 -110.33 -110.33
2019-04-12 -1938.2 1833.07 -105.13 -105.13
2019-05-10 -113.2 0 -113.2 -113.2
2019-06-18 -1921.58 1808.99 -112.59 -112.59
2019-08-08 -21.58 0 -21.58 -21.58
2019-08-09 -1948.12 1917.69 -30.43 -30.43
2019-11-11 -79.12 0 -79.12 -79.12
2019-12-17 -2079.12 2001.87 -77.25 -77.25
2020-01-28 -164.45 0 -164.45 -164.45
2020-05-21 -1769.45 1595.68 -173.77 -173.77
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $-177.11
The current status of the model is: Holding a position since 2020-05-21 00:00:00
Processing portfolio for model: EMA_029_SlowMA_50_FastMA_15
BOUGHT QTY: 1 on 2019-02-01 00:00:00 at the price of 1824.05
SOLD QTY: -1 on 2019-03-07 00:00:00 at the price of 1746.5
BOUGHT QTY: 1 on 2019-04-15 00:00:00 at the price of 1834.0
SOLD QTY: -1 on 2019-05-14 00:00:00 at the price of 1787.12
BOUGHT QTY: 1 on 2019-06-20 00:00:00 at the price of 1862.07
SOLD QTY: -1 on 2019-11-12 00:00:00 at the price of 1901.35
BOUGHT QTY: 1 on 2019-12-18 00:00:00 at the price of 2008.67
SOLD QTY: -1 on 2020-01-30 00:00:00 at the price of 1871.42
BOUGHT QTY: 1 on 2020-05-22 00:00:00 at the price of 1591.74
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-02-01 1 1 1824.05 0 0
2019-03-07 -1 0 0 1746.5 -77.55
2019-04-15 1 1 1834 0 0
2019-05-14 -1 0 0 1787.12 -46.88
2019-06-20 1 1 1862.07 0 0
2019-11-12 -1 0 0 1901.35 39.28
2019-12-18 1 1 2008.67 0 0
2020-01-30 -1 0 0 1871.42 -137.25
2020-05-22 1 1 1591.74 0 0
cash_onhand position_value total_position accumu_return
date
2019-02-01 -1824.05 1836.96 12.91 12.91
2019-03-07 -77.55 0 -77.55 -77.55
2019-04-15 -1911.55 1846.23 -65.32 -65.32
2019-05-14 -124.43 0 -124.43 -124.43
2019-06-20 -1986.5 1861.31 -125.19 -125.19
2019-11-12 -85.15 0 -85.15 -85.15
2019-12-18 -2093.82 1991.51 -102.31 -102.31
2020-01-30 -222.4 0 -222.4 -222.4
2020-05-22 -1814.14 1631.3 -182.84 -182.84
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $-221.80
The current status of the model is: Holding a position since 2020-05-22 00:00:00
Processing portfolio for model: EMA_030_SlowMA_50_FastMA_20
BOUGHT QTY: 1 on 2019-02-04 00:00:00 at the price of 1840.39
SOLD QTY: -1 on 2019-03-08 00:00:00 at the price of 1708.04
BOUGHT QTY: 1 on 2019-04-16 00:00:00 at the price of 1851.8
SOLD QTY: -1 on 2019-05-20 00:00:00 at the price of 1769.73
BOUGHT QTY: 1 on 2019-06-21 00:00:00 at the price of 1859.36
SOLD QTY: -1 on 2019-11-13 00:00:00 at the price of 1855.59
BOUGHT QTY: 1 on 2019-12-20 00:00:00 at the price of 2017.0
SOLD QTY: -1 on 2020-01-31 00:00:00 at the price of 1865.93
BOUGHT QTY: 1 on 2020-05-27 00:00:00 at the price of 1775.93
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-02-04 1 1 1840.39 0 0
2019-03-08 -1 0 0 1708.04 -132.35
2019-04-16 1 1 1851.8 0 0
2019-05-20 -1 0 0 1769.73 -82.07
2019-06-21 1 1 1859.36 0 0
2019-11-13 -1 0 0 1855.59 -3.77
2019-12-20 1 1 2017 0 0
2020-01-31 -1 0 0 1865.93 -151.07
2020-05-27 1 1 1775.93 0 0
cash_onhand position_value total_position accumu_return
date
2019-02-04 -1840.39 1860.99 20.6 20.6
2019-03-08 -132.35 0 -132.35 -132.35
2019-04-16 -1984.15 1841.7 -142.45 -142.45
2019-05-20 -214.42 0 -214.42 -214.42
2019-06-21 -2073.78 1880 -193.78 -193.78
2019-11-13 -218.19 0 -218.19 -218.19
2019-12-20 -2235.19 2023.26 -211.93 -211.93
2020-01-31 -369.26 0 -369.26 -369.26
2020-05-27 -2145.19 1698.73 -446.46 -446.46
Accumulated profit/loss for one share of stock with initial capital of $0 at the end of modeling period: $-552.85
The current status of the model is: Holding a position since 2020-05-27 00:00:00
# Display the model performance summary
performance_summary.sort_values(by=['return_value'], inplace=True, ascending=False)
print(performance_summary)
model_name return_value return_percent 0 EMA_001_SlowMA_10_FastMA_05 -18.50 None 1 EMA_002_SlowMA_15_FastMA_05 -84.93 None 16 EMA_017_SlowMA_35_FastMA_15 -112.65 None 23 EMA_024_SlowMA_45_FastMA_10 -136.02 None 9 EMA_010_SlowMA_25_FastMA_20 -139.94 None 12 EMA_013_SlowMA_30_FastMA_15 -163.39 None 27 EMA_028_SlowMA_50_FastMA_10 -177.11 None 20 EMA_021_SlowMA_40_FastMA_15 -184.24 None 28 EMA_029_SlowMA_50_FastMA_15 -221.80 None 13 EMA_014_SlowMA_30_FastMA_20 -237.25 None 24 EMA_025_SlowMA_45_FastMA_15 -250.47 None 21 EMA_022_SlowMA_40_FastMA_20 -262.51 None 6 EMA_007_SlowMA_25_FastMA_05 -278.61 None 26 EMA_027_SlowMA_50_FastMA_05 -286.42 None 2 EMA_003_SlowMA_15_FastMA_10 -296.93 None 17 EMA_018_SlowMA_35_FastMA_20 -301.72 None 22 EMA_023_SlowMA_45_FastMA_05 -310.79 None 11 EMA_012_SlowMA_30_FastMA_10 -336.91 None 3 EMA_004_SlowMA_20_FastMA_05 -339.81 None 14 EMA_015_SlowMA_35_FastMA_05 -347.89 None 15 EMA_016_SlowMA_35_FastMA_10 -352.12 None 19 EMA_020_SlowMA_40_FastMA_10 -356.43 None 8 EMA_009_SlowMA_25_FastMA_15 -356.70 None 7 EMA_008_SlowMA_25_FastMA_10 -402.29 None 18 EMA_019_SlowMA_40_FastMA_05 -429.67 None 5 EMA_006_SlowMA_20_FastMA_15 -431.77 None 25 EMA_026_SlowMA_45_FastMA_20 -435.48 None 4 EMA_005_SlowMA_20_FastMA_10 -467.21 None 10 EMA_011_SlowMA_30_FastMA_05 -469.73 None 29 EMA_030_SlowMA_50_FastMA_20 -552.85 None
# Display the transactions from the top model
top_model = performance_summary.iloc[0]['model_name']
print('The transactions from the top model %s:' % (top_model))
print(portfolio_collection[top_model][portfolio_collection[top_model].trade_action != 0])
The transactions from the top model EMA_001_SlowMA_10_FastMA_05:
trade_action qty_onhand cost_basis sold_transaction gain_loss \
date
2019-01-18 1 1 1747.02 0 0
2019-03-01 -1 0 0 1708.2 -38.82
2019-03-21 1 1 1765.8 0 0
2019-03-25 -1 0 0 1714.01 -51.79
2019-03-27 1 1 1768.98 0 0
2019-03-28 -1 0 0 1759.99 -8.99
2019-04-03 1 1 1778.47 0 0
2019-05-03 -1 0 0 1816.17 37.7
2019-06-06 1 1 1766.01 0 0
2019-07-18 -1 0 0 1861.83 95.82
2019-07-19 1 1 1896.03 0 0
2019-08-02 -1 0 0 1874.11 -21.92
2019-08-12 1 1 1900.44 0 0
2019-09-25 -1 0 0 1991.65 91.21
2019-10-15 1 1 1992.21 0 0
2019-11-05 -1 0 0 2008.99 16.78
2019-11-29 1 1 1904.89 0 0
2019-12-04 -1 0 0 1894.64 -10.25
2019-12-05 1 1 1929 0 0
2020-01-21 -1 0 0 2006 77
2020-02-13 1 1 1944 0 0
2020-02-25 -1 0 0 1803 -141
2020-04-08 1 1 1382.65 0 0
2020-04-23 -1 0 0 1354.05 -28.6
2020-04-29 1 1 1487.83 0 0
2020-05-07 -1 0 0 1392.26 -95.57
2020-05-08 1 1 1416.69 0 0
2020-05-13 -1 0 0 1379.34 -37.35
2020-05-19 1 1 1556.29 0 0
2020-06-12 -1 0 0 1653.57 97.28
cash_onhand position_value total_position accumu_return
date
2019-01-18 -1747.02 1760.26 13.24 13.24
2019-03-01 -38.82 0 -38.82 -38.82
2019-03-21 -1804.62 1774.36 -30.26 -30.26
2019-03-25 -90.61 0 -90.61 -90.61
2019-03-27 -1859.59 1752.11 -107.48 -107.48
2019-03-28 -99.6 0 -99.6 -99.6
2019-04-03 -1878.07 1774.93 -103.14 -103.14
2019-05-03 -61.9 0 -61.9 -61.9
2019-06-06 -1827.91 1754.86 -73.05 -73.05
2019-07-18 33.92 0 33.92 33.92
2019-07-19 -1862.11 1882.09 19.98 19.98
2019-08-02 12 0 12 12
2019-08-12 -1888.44 1916.89 28.45 28.45
2019-09-25 103.21 0 103.21 103.21
2019-10-15 -1889 2016.39 127.39 127.39
2019-11-05 119.99 0 119.99 119.99
2019-11-29 -1784.9 1904.03 119.13 119.13
2019-12-04 109.74 0 109.74 109.74
2019-12-05 -1819.26 1904.22 84.96 84.96
2020-01-21 186.74 0 186.74 186.74
2020-02-13 -1757.26 1959.94 202.68 202.68
2020-02-25 45.74 0 45.74 45.74
2020-04-08 -1336.91 1372.06 35.15 35.15
2020-04-23 17.14 0 17.14 17.14
2020-04-29 -1470.69 1520.53 49.84 49.84
2020-05-07 -78.43 0 -78.43 -78.43
2020-05-08 -1495.12 1430.83 -64.29 -64.29
2020-05-13 -115.78 0 -115.78 -115.78
2020-05-19 -1672.07 1547.56 -124.51 -124.51
2020-06-12 -18.5 0 -18.5 -18.5
# Display the entry and exit signals for the top model
print('The trading signal changes from the top model %s:' % (top_model))
print(model_collection[top_model][model_collection[top_model].signal_change != 0])
The trading signal changes from the top model EMA_001_SlowMA_10_FastMA_05:
open_price close_price fast_ma slow_ma ma_change \
date
2019-01-17 1681.73 1724.51 1698.177482 1695.526150 2.651332
2019-02-28 1754.00 1697.04 1837.781139 1866.682948 -28.901809
2019-03-20 1766.78 1774.43 1760.751611 1758.999554 1.752056
2019-03-22 1754.04 1721.59 1750.721827 1754.482842 -3.761015
2019-03-26 1761.20 1768.87 1757.141923 1756.787357 0.354566
2019-03-27 1768.98 1752.11 1755.464615 1755.936929 -0.472313
2019-04-02 1766.03 1763.55 1754.808196 1753.775457 1.032738
2019-05-02 1824.66 1808.00 1837.500013 1842.778845 -5.278832
2019-06-05 1755.75 1765.00 1719.748369 1718.262751 1.485618
2019-07-17 1887.75 1867.74 1878.385727 1878.429741 -0.044014
2019-07-18 1861.83 1885.91 1880.893818 1879.789788 1.104030
2019-08-01 1885.47 1879.86 1900.248039 1903.080193 -2.832155
2019-08-09 1926.54 1917.69 1882.501296 1876.722095 5.779200
2019-09-24 2012.82 1990.64 2020.845268 2025.317076 -4.471807
2019-10-14 1964.52 1988.75 1971.269067 1969.762887 1.506180
2019-11-04 2042.00 2007.68 2030.480653 2031.528674 -1.048021
2019-11-27 1893.00 1906.45 1888.982124 1886.626078 2.356046
2019-12-03 1865.39 1879.98 1887.201370 1887.210782 -0.009412
2019-12-04 1894.64 1921.53 1898.644247 1893.450640 5.193607
2020-01-17 2060.00 2054.69 2062.275286 2062.726258 -0.450973
2020-02-12 1923.95 1960.36 1924.072116 1920.383765 3.688351
2020-02-24 1830.93 1792.54 1900.010119 1920.736442 -20.726323
2020-04-07 1412.01 1376.37 1324.083823 1314.980346 9.103477
2020-04-22 1365.01 1355.00 1383.015777 1386.062103 -3.046326
2020-04-28 1434.20 1439.32 1400.950030 1392.833253 8.116777
2020-05-06 1397.46 1378.91 1408.927204 1414.080972 -5.153768
2020-05-07 1392.26 1443.91 1420.588136 1419.504432 1.083705
2020-05-12 1401.09 1385.92 1408.418707 1413.511518 -5.092811
2020-05-18 1430.00 1557.43 1444.710732 1426.836814 17.873918
2020-06-11 1655.85 1588.37 1703.095553 1703.129644 -0.034090
trade_signal signal_change entry_exit
date
2019-01-17 1.0 1.0 0.0
2019-02-28 0.0 -1.0 0.0
2019-03-20 1.0 1.0 0.0
2019-03-22 0.0 -1.0 0.0
2019-03-26 1.0 1.0 0.0
2019-03-27 0.0 -1.0 1.0
2019-04-02 1.0 1.0 0.0
2019-05-02 0.0 -1.0 0.0
2019-06-05 1.0 1.0 0.0
2019-07-17 0.0 -1.0 0.0
2019-07-18 1.0 1.0 -1.0
2019-08-01 0.0 -1.0 0.0
2019-08-09 1.0 1.0 0.0
2019-09-24 0.0 -1.0 0.0
2019-10-14 1.0 1.0 0.0
2019-11-04 0.0 -1.0 0.0
2019-11-27 1.0 1.0 0.0
2019-12-03 0.0 -1.0 0.0
2019-12-04 1.0 1.0 -1.0
2020-01-17 0.0 -1.0 0.0
2020-02-12 1.0 1.0 0.0
2020-02-24 0.0 -1.0 0.0
2020-04-07 1.0 1.0 0.0
2020-04-22 0.0 -1.0 0.0
2020-04-28 1.0 1.0 0.0
2020-05-06 0.0 -1.0 0.0
2020-05-07 1.0 1.0 -1.0
2020-05-12 0.0 -1.0 0.0
2020-05-18 1.0 1.0 0.0
2020-06-11 0.0 -1.0 0.0
graph_data = model_collection[top_model].copy()
title_string = "Exponential Moving Average Crossover Model for " + top_model
fig = plt.figure(figsize=(16,9))
ylabel = stock_symbol + ' price in $'
ax1 = fig.add_subplot(111, ylabel=ylabel, title=title_string)
graph_data['fast_ma'].plot(ax=ax1, color='b', lw=2.)
graph_data['slow_ma'].plot(ax=ax1, color='r', lw=2.)
graph_data['close_price'].plot(ax=ax1, color='g')
ax1.plot(graph_data.loc[graph_data.entry_exit == 1].index, graph_data.close_price[graph_data.entry_exit == 1], '^', markersize=7, color='k',label='buy')
ax1.plot(graph_data.loc[graph_data.entry_exit == -1].index, graph_data.close_price[graph_data.entry_exit == -1], 'v', markersize=7, color='k',label='sell')
plt.legend(loc='upper left')
plt.show()
best_model = ''
best_return = 0
for key in portfolio_collection:
if portfolio_collection[key]['accumu_return'][-1] > best_return:
best_model = key
best_return = portfolio_collection[best_model]['accumu_return'][-1]
print('The best model found is:', best_model)
print('The best profit/loss for the investing period is: $%.2f' % (best_return))
if initial_capital != 0:
print('The best return percentage for initial capital is: %.2f%%' % (best_return / initial_capital * 100))
The best model found is: The best profit/loss for the investing period is: $0.00
worst_model = None
worst_return = 0
for key in portfolio_collection:
if portfolio_collection[key]['accumu_return'][-1] < worst_return:
worst_model = key
worst_return = portfolio_collection[worst_model]['accumu_return'][-1]
print('The worst model found is:', worst_model)
print('The worst profit/loss for the investing period is: $%.2f' % (worst_return))
if initial_capital != 0:
print('The worst return percentage for the initial capital is: %.2f%%' % (worst_return / initial_capital * 100))
The worst model found is: EMA_030_SlowMA_50_FastMA_20 The worst profit/loss for the investing period is: $-552.85
# Calculate the stock's performance for a long-only model
model_template = model_template[model_start_date:model_end_date]
print('The performance of the long-only model from day one is: $%.2f' %(model_template.iloc[-1]['close_price'] - model_template.iloc[0]['open_price']))
The performance of the long-only model from day one is: $-98.91
print ('Total time for the script:',(datetime.now() - startTimeScript))
Total time for the script: 0:00:46.323522